439
439
440
440
let once = OncePerProcess (() -> return [nothing ])
441
441
@test typeof (once) <: OncePerProcess{Vector{Nothing}}
442
- x = once ()
442
+ x = @inferred once ()
443
443
@test x === once ()
444
444
@atomic once. state = 0xff
445
445
@test_throws ErrorException (" invalid state for OncePerProcess" ) once ()
@@ -456,7 +456,7 @@ let e = Base.Event(true),
456
456
started = Channel {Int16} (Inf ),
457
457
finish = Channel {Nothing} (Inf ),
458
458
exiting = Channel {Nothing} (Inf ),
459
- starttest2 = Event (),
459
+ starttest2 = Base . Event (),
460
460
once = OncePerThread () do
461
461
push! (started, threadid ())
462
462
take! (finish)
@@ -468,7 +468,7 @@ let e = Base.Event(true),
468
468
@test typeof (once) <: OncePerThread{Vector{Nothing}}
469
469
push! (finish, nothing )
470
470
@test_throws ArgumentError once[0 ]
471
- x = once ()
471
+ x = @inferred once ()
472
472
@test_throws ArgumentError once[0 ]
473
473
@test x === once () === fetch (@async once ()) === once[threadid ()]
474
474
@test take! (started) == threadid ()
558
558
559
559
let once = OncePerTask (() -> return [nothing ])
560
560
@test typeof (once) <: OncePerTask{Vector{Nothing}}
561
- x = once ()
561
+ x = @inferred once ()
562
562
@test x === once () != = fetch (@async once ())
563
563
delete! (task_local_storage (), once)
564
564
@test x != = once () === once ()
0 commit comments