example-bug-rising-edge-true.rkt

This commit is contained in:
Tony Garnock-Jones 2017-05-04 09:08:47 -04:00
parent 6448188e82
commit b9dfd79f34
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#lang syndicate/actor
;; Demonstrates a bug: rising-edge of a predicate that starts off true
;; yields a crash.
(spawn (field [f #t])
(stop-when (rising-edge (f))
(printf "Stopping (via field).\n")))
(spawn (stop-when (rising-edge #t)
(printf "Stopping (direct).\n")))