Progress
This commit is contained in:
parent
21bb695ac8
commit
4eb43a158e
|
@ -229,8 +229,8 @@
|
||||||
(when (not qs) (error 'turn-enqueue! "Attempt to reuse a committed turn"))
|
(when (not qs) (error 'turn-enqueue! "Attempt to reuse a committed turn"))
|
||||||
(hash-update! qs f (lambda (actions) (cons action actions)) '()))
|
(hash-update! qs f (lambda (actions) (cons action actions)) '()))
|
||||||
|
|
||||||
(define (turn-ref turn entity)
|
(define (turn-ref turn entity [attenuation '()])
|
||||||
(ref (turn-active-facet turn) entity))
|
(ref (turn-active-facet turn) entity attenuation))
|
||||||
|
|
||||||
(define (turn-facet! turn boot-proc)
|
(define (turn-facet! turn boot-proc)
|
||||||
(let ((new-facet (make-facet (facet-actor (turn-active-facet turn)) (turn-active-facet turn))))
|
(let ((new-facet (make-facet (facet-actor (turn-active-facet turn)) (turn-active-facet turn))))
|
||||||
|
|
|
@ -4,5 +4,12 @@
|
||||||
|
|
||||||
(actor-system
|
(actor-system
|
||||||
(lambda (turn)
|
(lambda (turn)
|
||||||
|
(define disarm (facet-prevent-inert-check! (turn-active-facet turn)))
|
||||||
|
(define r1 (turn-ref turn (entity #:message (lambda (turn m)
|
||||||
|
(log-info "r1 got ~v" m)
|
||||||
|
(turn-stop! turn)))))
|
||||||
|
(define r2 (turn-ref turn (entity #:message (lambda (turn m) (log-info "r2 got ~v" m)))))
|
||||||
(turn-spawn! turn (lambda (turn)
|
(turn-spawn! turn (lambda (turn)
|
||||||
(printf "Hi!\n")))))
|
(log-info "Hi!")
|
||||||
|
(turn-message! turn r1 'hello-there-r1)
|
||||||
|
(turn-message! turn r2 'hello-there-r2)))))
|
||||||
|
|
Loading…
Reference in New Issue