Skip to content

Commit

Permalink
fix multiq_check_empty to only look at the caller's pool (#49065)
Browse files Browse the repository at this point in the history
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
  • Loading branch information
JeffBezanson and vtjnash authored Mar 20, 2023
1 parent ceeefc8 commit 1323d2f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions base/partr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,12 @@ function multiq_deletemin()
return task
end


function multiq_check_empty()
for j = UInt32(1):length(heaps)
for i = UInt32(1):length(heaps[j])
if heaps[j][i].ntasks != 0
return false
end
tid = Threads.threadid()
tp = ccall(:jl_threadpoolid, Int8, (Int16,), tid-1) + 1
for i = UInt32(1):length(heaps[tp])
if heaps[tp][i].ntasks != 0
return false
end
end
return true
Expand Down

0 comments on commit 1323d2f

Please sign in to comment.