Use :template in send!.

This commit is contained in:
Tony Garnock-Jones 2021-06-03 16:07:25 +02:00
parent 6b3988caf7
commit 2fa1b033eb
2 changed files with 2 additions and 3 deletions

View File

@ -33,8 +33,7 @@
(action (ds)
(spawn (define root-facet this-facet)
(at ds
(when (asserted (BoxState $value))
(send! ds (SetBox->preserves (SetBox (+ value 1)))))
(when (asserted (BoxState $value)) (send! ds (SetBox (+ value 1))))
(during (BoxState _)
(on-stop (log-info "Client detected box termination")
(stop-facet root-facet)))))))

View File

@ -95,7 +95,7 @@
(turn-sync! this-turn peer (action (_reply) expr ...)))
(define-syntax-rule (send! peer assertion)
(turn-message! this-turn peer assertion))
(turn-message! this-turn peer (:template assertion)))
(define-syntax-rule (spawn setup-expr ...)
(turn-spawn! this-turn (action () setup-expr ...)))