From b610cb6792efdcd3d9cea9595202e64c32af7292 Mon Sep 17 00:00:00 2001 From: K Pamnany Date: Thu, 16 Feb 2023 21:19:42 -0500 Subject: [PATCH] Fix test for threadpool use --- test/threadpool_use.jl | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/threadpool_use.jl b/test/threadpool_use.jl index 47c45bdd71eb80..64227c8a8110be 100644 --- a/test/threadpool_use.jl +++ b/test/threadpool_use.jl @@ -6,11 +6,6 @@ using Base.Threads @test nthreadpools() == 2 @test threadpool() === :default @test threadpool(2) === :interactive -dtask() = @test threadpool(current_task()) === :default -itask() = @test threadpool(current_task()) === :interactive -dt1 = @spawn dtask() -dt2 = @spawn :default dtask() -it = @spawn :interactive itask() -wait(dt1) -wait(dt2) -wait(it) +@test fetch(Threads.@spawn Threads.threadpool()) === :default +@test fetch(Threads.@spawn :default Threads.threadpool()) === :default +@test fetch(Threads.@spawn :interactive Threads.threadpool()) === :interactive