2016-07-10 16:33:16 +00:00
|
|
|
#lang syndicate/actor
|
2016-07-09 21:25:37 +00:00
|
|
|
;; Demonstrates that fields may not be passed between actors.
|
|
|
|
|
|
|
|
(actor #:name 'reading-actor
|
|
|
|
(react
|
|
|
|
(on (message `(read-from ,$this-field))
|
|
|
|
(log-info "Trying to read from ~a" this-field)
|
|
|
|
(log-info "Read: ~a" (this-field))
|
|
|
|
(send! `(read-successfully ,this-field)))))
|
|
|
|
|
|
|
|
(actor #:name 'requesting-actor
|
|
|
|
(field [a 123])
|
|
|
|
(send! `(read-from ,a))
|
|
|
|
(until (message `(read-successfully ,a)))
|
|
|
|
(log-info "Done."))
|