diff --git a/syndicate/dataspace.rkt b/syndicate/dataspace.rkt index 6aa0087..3f99fba 100644 --- a/syndicate/dataspace.rkt +++ b/syndicate/dataspace.rkt @@ -413,7 +413,8 @@ ;; Abruptly terminates an entire actor, without running stop-scripts etc. (define (terminate-actor! ds the-actor) (push-script! ds the-actor - (lambda () (for [(a (actor-adhoc-assertions the-actor))] (retract! the-actor a)))) + (lambda () (for [(a (in-set (actor-adhoc-assertions the-actor)))] + (retract! the-actor a)))) (let ((f (actor-root-facet the-actor))) (when f (let abort-facet! ((f f)) @@ -436,7 +437,7 @@ ;; Run stop-scripts after terminating children. This means that ;; children's stop-scripts run before ours. - (for [(script (reverse (facet-stop-scripts f)))] + (for [(script (in-list (reverse (facet-stop-scripts f))))] (schedule-script! ds ac (lambda ()