cs: fix unsafe-thread-at-root to use the root custodian

Otherwise, a finalization thread can get shut down, resulting in a
leak.
This commit is contained in:
Matthew Flatt 2019-05-03 15:00:33 -06:00
parent 12e2b88197
commit 9951efc891

View File

@ -13,6 +13,7 @@
"atomic.rkt"
"schedule-info.rkt"
"custodian.rkt"
"custodian-object.rkt"
"exit.rkt")
(provide (rename-out [make-thread thread])
@ -215,7 +216,9 @@
t))
(define (unsafe-thread-at-root proc)
(do-make-thread 'unsafe-thread-at-root proc #:at-root? #t))
(do-make-thread 'unsafe-thread-at-root proc
#:at-root? #t
#:custodian root-custodian))
;; ----------------------------------------
;; Thread status