From ce6cd58930476c72355eb47490f4d6724c15ada1 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 25 Apr 2018 19:54:58 +0100 Subject: [PATCH] Run stop-scripts in one scheduled execution --- syndicate/dataspace.rkt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/syndicate/dataspace.rkt b/syndicate/dataspace.rkt index 3f99fba..99fe148 100644 --- a/syndicate/dataspace.rkt +++ b/syndicate/dataspace.rkt @@ -437,12 +437,10 @@ ;; Run stop-scripts after terminating children. This means that ;; children's stop-scripts run before ours. - (for [(script (in-list (reverse (facet-stop-scripts f))))] - (schedule-script! ds - ac - (lambda () - (with-current-facet [ds ac f #t] - (script))))) + (schedule-script! ds ac (lambda () + (with-current-facet [ds ac f #t] + (for [(script (in-list (reverse (facet-stop-scripts f))))] + (script))))) (retract-facet-assertions-and-subscriptions! ds f)