mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 13:16:36 +02:00
Broadcast on sending to an empty channel in case multiple threads are waiting.
Fixes issue #240.
This commit is contained in:
parent
843943719a
commit
88506ca53e
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@
|
||||||
(set-cdr! rear new))
|
(set-cdr! rear new))
|
||||||
(else ; sending to empty channel
|
(else ; sending to empty channel
|
||||||
(channel-front-set! chan new)
|
(channel-front-set! chan new)
|
||||||
(condition-variable-signal! (channel-condvar chan)))))
|
(condition-variable-broadcast! (channel-condvar chan)))))
|
||||||
(mutex-unlock! (channel-mutex chan)))
|
(mutex-unlock! (channel-mutex chan)))
|
||||||
|
|
||||||
(define (channel-receive! chan)
|
(define (channel-receive! chan)
|
||||||
|
|
Loading…
Add table
Reference in a new issue