Skip to content

Commit

Permalink
Assert tid>0 in workqueue_for (JuliaLang#50602)
Browse files Browse the repository at this point in the history
Otherwise the inbounds annotations are not sound. As requested in
JuliaLang#50597 (review).
  • Loading branch information
Keno committed Jul 22, 2023
1 parent 6691a75 commit d1be33d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/task.jl
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ function workqueue_for(tid::Int)
return @inbounds qs[tid]
end
# slow path to allocate it
@assert tid > 0
l = Workqueues_lock
@lock l begin
qs = Workqueues
Expand Down

0 comments on commit d1be33d

Please sign in to comment.