Skip to content

Commit

Permalink
Fix test for threadpool use
Browse files Browse the repository at this point in the history
  • Loading branch information
kpamnany committed Mar 6, 2023
1 parent 636851e commit b610cb6
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/threadpool_use.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b610cb6

Please sign in to comment.