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:
parent
12e2b88197
commit
9951efc891
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user