Skip to content

Commit 55422d9

Browse files
committed
Fix test for threadpool use
1 parent a3a92e8 commit 55422d9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

test/threadpool_use.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ using Base.Threads
66
@test nthreadpools() == 2
77
@test threadpool() === :default
88
@test threadpool(2) === :interactive
9-
dtask() = @test threadpool(current_task()) === :default
10-
itask() = @test threadpool(current_task()) === :interactive
11-
dt1 = @spawn dtask()
12-
dt2 = @spawn :default dtask()
13-
it = @spawn :interactive itask()
14-
wait(dt1)
15-
wait(dt2)
16-
wait(it)
9+
@test fetch(Threads.@spawn Threads.threadpool()) === :default
10+
@test fetch(Threads.@spawn :default Threads.threadpool()) === :default
11+
@test fetch(Threads.@spawn :interactive Threads.threadpool()) === :interactive

0 commit comments

Comments
 (0)