Skip to content

Commit d65e24f

Browse files
authored
Make add/remove-macrovertex messages async (#82)
1 parent 8324b14 commit d65e24f

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/operations/contract.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,15 @@ If we have a non-null peduncle edge (F -> C above), then we need to tell its sou
269269
(sync-rpc (make-message-values :values '(dryad))
270270
((dryad-address) rootmost-cycle-node)
271271
(setf (supervisor-node-dryad supervisor) dryad-address)
272+
(send-message dryad-address
273+
(make-message-add-macrovertex :address fresh-blossom))
272274
(sync-rpc (make-message-set-up-blossom
273275
:peduncle-edge peduncle-edge
274276
:petals path
275277
:petal-children petal-child-edges
276278
:dryad dryad-address)
277279
(set-up-result fresh-blossom)
278-
(sync-rpc (make-message-add-macrovertex :address fresh-blossom)
279-
(result dryad-address)
280-
(values))))))))
280+
(values)))))))
281281

282282
;;;
283283
;;; message definitions

src/operations/expand.lisp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,12 @@ In the right diagram, b0 is both the `root-node' and the `matched-node', because
385385

386386
(define-process-upkeep ((node blossom-node)) (EXTINGUISH-BLOSSOM reply-channel)
387387
"Tell this blossom process to die."
388-
(sync-rpc (make-message-remove-macrovertex :address (process-public-address node))
389-
(result (blossom-node-dryad node))
390-
;; NOTE: There's no data frame to pop.
391-
(when reply-channel
392-
(send-message reply-channel (make-message-rpc-done)))
393-
(log-entry :entry-type ':blossom-extinguished
394-
:log-level 2
395-
:blossom node)
396-
(setf (blossom-node-wilting node) t)))
388+
(send-message (blossom-node-dryad node)
389+
(make-message-remove-macrovertex :address (process-public-address node)))
390+
;; NOTE: There's no data frame to pop.
391+
(when reply-channel
392+
(send-message reply-channel (make-message-rpc-done)))
393+
(log-entry :entry-type ':blossom-extinguished
394+
:log-level 2
395+
:blossom node)
396+
(setf (blossom-node-wilting node) t))

tests/operations/expand.lisp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,5 +399,4 @@
399399
(vv-edge F D))
400400
:match-edge (bb-edge BLOSSOM2 D B B)
401401
:positive? t))
402-
(is (tree-equalp original-tree target-tree))
403-
(is (= 1 (hash-table-count (dryad-macrovertices dryad)))))))))
402+
(is (tree-equalp original-tree target-tree)))))))

0 commit comments

Comments
 (0)