Run stop-scripts in one scheduled execution

This commit is contained in:
Tony Garnock-Jones 2018-04-25 19:54:58 +01:00
parent dfe8a3e96e
commit ce6cd58930
1 changed files with 4 additions and 6 deletions

View File

@ -437,12 +437,10 @@
;; Run stop-scripts after terminating children. This means that ;; Run stop-scripts after terminating children. This means that
;; children's stop-scripts run before ours. ;; children's stop-scripts run before ours.
(for [(script (in-list (reverse (facet-stop-scripts f))))] (schedule-script! ds ac (lambda ()
(schedule-script! ds (with-current-facet [ds ac f #t]
ac (for [(script (in-list (reverse (facet-stop-scripts f))))]
(lambda () (script)))))
(with-current-facet [ds ac f #t]
(script)))))
(retract-facet-assertions-and-subscriptions! ds f) (retract-facet-assertions-and-subscriptions! ds f)