don't run new facets asap

This commit is contained in:
Sam Caldwell 2017-03-10 13:39:50 -05:00
parent 34c3b6bf3a
commit c8cc8051a1
1 changed files with 13 additions and 3 deletions

View File

@ -631,8 +631,8 @@
(define-values (final-sto final-as new-children)
(for/fold ([sto new-sto]
[as as]
[new-children (list)])
([ft (in-list (append children new-facets))])
[new-children new-facets])
([ft (in-list children)])
(match (run-facets ft π sto e)
[(ok new-sto new-ft more-as)
(values new-sto
@ -892,4 +892,14 @@
(on (asserted (observe "poodle"))
(send! "poodle"))))))
(test-trace (trace (message "success"))
stop-when-react))
stop-when-react))
(module+ test
(define do-new-facets-run-immediately
'(
(actor (react (on (message "hello")
(react (on (message "hello")
(send! "I am here"))))))
(actor (react (on-start (send! "hello"))))))
(check-false (run-with-trace (trace (message "I am here"))
do-new-facets-run-immediately)))