Allow stateless actors to be given names
This commit is contained in:
parent
cecb261c6b
commit
9f8ddc5249
|
@ -271,10 +271,17 @@
|
|||
(transition initial-state-exp initial-action-tree-exp)
|
||||
#f)))]))
|
||||
|
||||
(define-syntax-rule (spawn/stateless behavior-exp initial-action-tree-exp)
|
||||
(spawn-process (stateless-behavior-wrap behavior-exp)
|
||||
(void)
|
||||
initial-action-tree-exp))
|
||||
(define-syntax spawn/stateless
|
||||
(syntax-rules ()
|
||||
[(_ #:name name-exp behavior-exp initial-action-tree-exp)
|
||||
(spawn-process #:name name-exp
|
||||
(stateless-behavior-wrap behavior-exp)
|
||||
(void)
|
||||
initial-action-tree-exp)]
|
||||
[(_ behavior-exp initial-action-tree-exp)
|
||||
(spawn-process (stateless-behavior-wrap behavior-exp)
|
||||
(void)
|
||||
initial-action-tree-exp)]))
|
||||
|
||||
(define ((stateless-behavior-wrap b) e state)
|
||||
(match (b e)
|
||||
|
|
Loading…
Reference in New Issue