Skip to content

Commit

Permalink
fix multiq_check_empty to only look at the caller's pool (JuliaLang#4…
Browse files Browse the repository at this point in the history
…9065)

Co-authored-by: Jameson Nash <[email protected]>
  • Loading branch information
2 people authored and Xnartharax committed Apr 13, 2023
1 parent a1a9ad4 commit b06cef8
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 b06cef8

Please sign in to comment.