Skip to content

Commit

Permalink
Allow for multiple couriers in blossom-let macro
Browse files Browse the repository at this point in the history
  • Loading branch information
karalekas committed Dec 3, 2023
1 parent 40a7a04 commit 41c159b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/node.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ Finally, all of the nodes constructed by this BLOSSOM-LET are stashed in the pla
(let (addresses augmented-node-definitions)
;; precompute addresses for the nodes
(loop :for (symbol-name . rest) :in node-definitions
;; if the node arguments include :process-courier, use the provided
;; courier instance when pre-registering the address for this node
:for courier-idx := (position ':process-courier rest)
:for courier := (when courier-idx (nth (1+ courier-idx) rest))
:for courier-clause := (when courier `(:courier ,courier))
:collect `(,symbol-name (register
,@courier-clause
:channel ',(gensym
(format nil "TEST-BLOSSOM-~A"
symbol-name))))
Expand All @@ -198,7 +204,8 @@ Finally, all of the nodes constructed by this BLOSSOM-LET are stashed in the pla
:process-key ,symbol-name
,@chopped-args
,@global-options
:debug? t)) :into result
:debug? t))
:into result
:finally (setf augmented-node-definitions result))
`(let ,addresses
(declare (ignorable ,@(mapcar #'first node-definitions)))
Expand Down

0 comments on commit 41c159b

Please sign in to comment.