Browse Source

simple-cross-layer.rkt

pr/32
Tony Garnock-Jones 4 years ago
parent
commit
e41290c509
  1. 11
      racket/syndicate/examples/actor/simple-cross-layer.rkt

11
racket/syndicate/examples/actor/simple-cross-layer.rkt

@ -0,0 +1,11 @@
#lang syndicate
(assertion-struct greeting (text))
(spawn (assert (greeting "Hello from an outer dataspace actor!")))
(spawn (on (asserted (greeting $t))
(printf "Outer dataspace: ~a\n" t)))
(dataspace (spawn (assert (outbound (greeting "Hello from an inner dataspace actor!"))))
(spawn (on (asserted (inbound (greeting $t)))
(printf "Inner dataspace: ~a\n" t))))
Loading…
Cancel
Save