Feoramund
d38f5ffb49
Remove unneeded synchronizations in Chan
...
Everything was already guarded by `c.mutex`.
2024-09-15 22:59:30 -04:00
Feoramund
8a14a656fb
Fix chan.can_send for unbuffered channels
...
`w_waiting` is the signal that says a caller is waiting to be able to
send something. It is incremented upon send and - in the case of an
unbuffered channel - it can only hold one message.
Therefore, check that `w_waiting` is zero instead.
2024-09-10 14:52:20 -04:00
Feoramund
e9a6a34480
Forbid chan.try_send on closed buffered channels
2024-09-10 14:52:20 -04:00
Feoramund
026aef69e3
Fix deadlock on sending to full, buffered, closed Chan
...
This will also keep messages from being sent to closed, buffered
channels in general.
2024-09-10 14:52:20 -04:00
Feoramund
73f5ab473c
Keep chan.can_recv from deadlocking
2024-09-10 14:52:20 -04:00
Laytan Laats
75dd562a0a
fix #4219 - recursive mutex lock
2024-09-08 22:23:03 +02:00
gingerBill
e72d0ba804
Move around mutex guard
2024-09-08 14:11:05 +01:00
gingerBill
e296d6fb90
Fix loads of indentation issues with mixing spaces and tabs
2024-06-29 19:50:51 +01:00
gingerBill
2380720fa2
Fix core:sync/chan for rand
2024-06-15 15:46:48 +01:00
Feoramund
f95bb77f72
Fix memory leak in sync/chan
2024-04-26 05:19:52 -04:00
gingerBill
656de10ba4
Minor changes to sync/chan (HIGHLY EXPERIMENTAL)
2024-02-22 13:59:22 +00:00
gingerBill
41549b502b
Basic concept of core:sync/chan
2024-02-21 15:24:24 +00:00