diff --git a/syndicate/dataspace.rkt b/syndicate/dataspace.rkt index 778122c..61449c0 100644 --- a/syndicate/dataspace.rkt +++ b/syndicate/dataspace.rkt @@ -232,6 +232,7 @@ (define (add-actor! ds name boot-proc initial-assertions) (define the-actor-id (generate-id! ds)) (define filtered-initial-assertions (set-remove initial-assertions (void))) + (define initial-delta (set->bag filtered-initial-assertions +1)) (define the-actor (actor the-actor-id ds name @@ -239,13 +240,9 @@ #f (make-vector priority-count (make-queue)) (make-queue) - (set->bag filtered-initial-assertions +1) - (set->bag filtered-initial-assertions -1))) - (for [(a filtered-initial-assertions)] - (match (bag-change! (dataspace-assertions ds) a +1) - ['absent->present (add-assertion! (dataspace-routing-table ds) a)] - ;; 'absent->absent and 'present->absent absurd - ['present->present (void)])) ;; i.e. no visible change + initial-delta + (bag))) + (apply-patch! ds the-actor initial-delta) ;; Root facet is a dummy "system" facet that exists to hold one-or-more "user" "root" facets. (add-facet! #f the-actor