Reuse apply-patch for initial-assertions too
This commit is contained in:
parent
00d50e6700
commit
f01b17dea4
|
@ -232,6 +232,7 @@
|
||||||
(define (add-actor! ds name boot-proc initial-assertions)
|
(define (add-actor! ds name boot-proc initial-assertions)
|
||||||
(define the-actor-id (generate-id! ds))
|
(define the-actor-id (generate-id! ds))
|
||||||
(define filtered-initial-assertions (set-remove initial-assertions (void)))
|
(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
|
(define the-actor (actor the-actor-id
|
||||||
ds
|
ds
|
||||||
name
|
name
|
||||||
|
@ -239,13 +240,9 @@
|
||||||
#f
|
#f
|
||||||
(make-vector priority-count (make-queue))
|
(make-vector priority-count (make-queue))
|
||||||
(make-queue)
|
(make-queue)
|
||||||
(set->bag filtered-initial-assertions +1)
|
initial-delta
|
||||||
(set->bag filtered-initial-assertions -1)))
|
(bag)))
|
||||||
(for [(a filtered-initial-assertions)]
|
(apply-patch! ds the-actor initial-delta)
|
||||||
(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
|
|
||||||
;; Root facet is a dummy "system" facet that exists to hold one-or-more "user" "root" facets.
|
;; Root facet is a dummy "system" facet that exists to hold one-or-more "user" "root" facets.
|
||||||
(add-facet! #f
|
(add-facet! #f
|
||||||
the-actor
|
the-actor
|
||||||
|
|
Loading…
Reference in New Issue