Skip to content

Commit

Permalink
fix #4219 - recursive mutex lock
Browse files Browse the repository at this point in the history
  • Loading branch information
laytan committed Sep 8, 2024
1 parent e72d0ba commit 75dd562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/sync/chan/chan.odin
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ can_recv :: proc "contextless" (c: ^Raw_Chan) -> bool {
can_send :: proc "contextless" (c: ^Raw_Chan) -> bool {
sync.guard(&c.mutex)
if is_buffered(c) {
return len(c) < cap(c)
return c.queue.len < c.queue.cap
}
return sync.atomic_load(&c.r_waiting) > 0
}
Expand Down

0 comments on commit 75dd562

Please sign in to comment.