Avoid potential (?) for wrong early termination of engine

This commit is contained in:
Tony Garnock-Jones 2021-06-11 09:55:48 +02:00
parent 26ca865b87
commit b2c591777e
1 changed files with 6 additions and 5 deletions

View File

@ -203,11 +203,12 @@
(exn->string reason)))
(for [(h (in-list (reverse (actor-exit-hooks ac))))] (h))
(queue-task! (actor-engine ac)
(lambda () (turn! (actor-root ac)
(lambda () (facet-terminate! (actor-root ac) (eq? reason #t)))
#t)))
(when (not (actor-daemon? ac))
(adjust-inhabitant-count! (actor-engine ac) -1))))
(lambda ()
(turn! (actor-root ac)
(lambda () (facet-terminate! (actor-root ac) (eq? reason #t)))
#t)
(when (not (actor-daemon? ac))
(adjust-inhabitant-count! (actor-engine ac) -1))))))
;;---------------------------------------------------------------------------