actor-remove-exit-hook!

This commit is contained in:
Tony Garnock-Jones 2021-06-08 09:23:23 +02:00
parent 4c72ab11f4
commit 557a0fb499
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,7 @@
actor-daemon?
actor-exit-reason
actor-add-exit-hook!
actor-remove-exit-hook!
actor-daemon!
facet?
@ -155,6 +156,10 @@
(define (actor-add-exit-hook! ac hook)
(set-actor-exit-hooks! ac (cons hook (actor-exit-hooks ac))))
(define (actor-remove-exit-hook! ac hook)
(set-actor-exit-hooks! ac (filter (lambda (h) (not (eq? h hook)))
(actor-exit-hooks ac))))
(define (actor-daemon! ac daemon?)
(when (not (eq? daemon? (actor-daemon? ac)))
(set-actor-daemon?! ac daemon?)