cs: fix future-thread signaling
Fix confusion between signal and broadcast operation.
This commit is contained in:
parent
b64e17388f
commit
3fb226ce2a
|
@ -407,7 +407,7 @@
|
||||||
(host:mutex-acquire (scheduler-mutex s))
|
(host:mutex-acquire (scheduler-mutex s))
|
||||||
(for ([w (in-list (scheduler-workers s))])
|
(for ([w (in-list (scheduler-workers s))])
|
||||||
(set-worker-die?! w #t))
|
(set-worker-die?! w #t))
|
||||||
(host:condition-signal (scheduler-cond s))
|
(host:condition-broadcast (scheduler-cond s))
|
||||||
(host:mutex-release (scheduler-mutex s))
|
(host:mutex-release (scheduler-mutex s))
|
||||||
(futures-sync-for-shutdown)
|
(futures-sync-for-shutdown)
|
||||||
(current-scheduler #f)))
|
(current-scheduler #f)))
|
||||||
|
@ -423,8 +423,7 @@
|
||||||
(cond
|
(cond
|
||||||
[(not old)
|
[(not old)
|
||||||
(set-scheduler-futures-head! s f)
|
(set-scheduler-futures-head! s f)
|
||||||
(set-scheduler-futures-tail! s f)
|
(set-scheduler-futures-tail! s f)]
|
||||||
(host:condition-signal (scheduler-cond s))]
|
|
||||||
[front?
|
[front?
|
||||||
(set-future*-next! f old)
|
(set-future*-next! f old)
|
||||||
(set-future*-prev! old f)
|
(set-future*-prev! old f)
|
||||||
|
@ -433,6 +432,7 @@
|
||||||
(set-future*-prev! f old)
|
(set-future*-prev! f old)
|
||||||
(set-future*-next! old f)
|
(set-future*-next! old f)
|
||||||
(set-scheduler-futures-tail! s f)])
|
(set-scheduler-futures-tail! s f)])
|
||||||
|
(host:condition-signal (scheduler-cond s))
|
||||||
(host:mutex-release (scheduler-mutex s)))
|
(host:mutex-release (scheduler-mutex s)))
|
||||||
|
|
||||||
;; called with queue lock held
|
;; called with queue lock held
|
||||||
|
|
Loading…
Reference in New Issue
Block a user