thread: repair for killing a thread blocked on itself

This commit is contained in:
Matthew Flatt 2018-10-12 05:56:39 -06:00
parent e260aef958
commit 51e08c48f1

View File

@ -246,9 +246,9 @@
(define (thread-dead! t)
(assert-atomic-mode)
(set-thread-engine! t 'done)
(run-interrupt-callback t)
(when (thread-dead-sema t)
(semaphore-post-all (thread-dead-sema t)))
(run-interrupt-callback t)
(unless (thread-descheduled? t)
(thread-group-remove! (thread-parent t) t))
(remove-from-sleeping-threads! t)