From e60a78aad9eae2128dcb596d9cdbba6ed044c57c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 5 Oct 2018 20:53:38 -0600 Subject: [PATCH] thread: custodian shutdown of current suspend-to-kill thread --- racket/src/thread/thread.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/racket/src/thread/thread.rkt b/racket/src/thread/thread.rkt index 452f52fb57..76f87958d1 100644 --- a/racket/src/thread/thread.rkt +++ b/racket/src/thread/thread.rkt @@ -332,7 +332,8 @@ ;; Check whether the current thread was terminated (let ([t (current-thread)]) (when t ; in case custodians used (for testing) without threads - (when (thread-dead? t) + (when (or (thread-dead? t) + (null? (thread-custodian-references t))) (engine-block)) (check-for-break-after-kill))))))