@@ -347,37 +347,38 @@ for T in (Int32, Int64, Float32, Float64)
347
347
@test varmax[] === T (maximum (1 : nloops))
348
348
@test varmin[] === T (0 )
349
349
end
350
-
351
- let async = Base. AsyncCondition (), t
352
- c = Condition ()
353
- task = schedule (Task (function ()
354
- notify (c)
355
- wait (c)
356
- t = Timer (0.06 )
357
- wait (t)
358
- ccall (:uv_async_send , Void, (Ptr{Void},), async)
359
- ccall (:uv_async_send , Void, (Ptr{Void},), async)
350
+ for period in (0.06 , Dates. Millisecond (60 ))
351
+ let async = Base. AsyncCondition (), t
352
+ c = Condition ()
353
+ task = schedule (Task (function ()
354
+ notify (c)
355
+ wait (c)
356
+ t = Timer (period)
357
+ wait (t)
358
+ ccall (:uv_async_send , Void, (Ptr{Void},), async)
359
+ ccall (:uv_async_send , Void, (Ptr{Void},), async)
360
+ wait (c)
361
+ sleep (period)
362
+ ccall (:uv_async_send , Void, (Ptr{Void},), async)
363
+ ccall (:uv_async_send , Void, (Ptr{Void},), async)
364
+ end ))
360
365
wait (c)
361
- sleep (0.06 )
362
- ccall (:uv_async_send , Void, (Ptr{Void},), async)
363
- ccall (:uv_async_send , Void, (Ptr{Void},), async)
364
- end ))
365
- wait (c)
366
- notify (c)
367
- delay1 = @elapsed wait (async)
368
- notify (c)
369
- delay2 = @elapsed wait (async)
370
- @test istaskdone (task)
371
- @test delay1 > 0.05
372
- @test delay2 > 0.05
373
- @test isopen (async)
374
- @test ! isopen (t)
375
- close (t)
376
- close (async)
377
- @test_throws EOFError wait (async)
378
- @test ! isopen (async)
379
- @test_throws EOFError wait (t)
380
- @test_throws EOFError wait (async)
366
+ notify (c)
367
+ delay1 = @elapsed wait (async)
368
+ notify (c)
369
+ delay2 = @elapsed wait (async)
370
+ @test istaskdone (task)
371
+ @test delay1 > 0.05
372
+ @test delay2 > 0.05
373
+ @test isopen (async)
374
+ @test ! isopen (t)
375
+ close (t)
376
+ close (async)
377
+ @test_throws EOFError wait (async)
378
+ @test ! isopen (async)
379
+ @test_throws EOFError wait (t)
380
+ @test_throws EOFError wait (async)
381
+ end
381
382
end
382
383
383
384
# Compare the two ways of checking if threading is enabled.
0 commit comments