2017-08-10 19:17:28 +00:00
|
|
|
#lang syndicate
|
2016-11-28 21:16:39 +00:00
|
|
|
;; Shows that the checks enforcing single-use suspension-resumption are working.
|
|
|
|
|
2017-02-15 23:18:19 +00:00
|
|
|
(spawn #:name 'shouldnt-work
|
2016-11-28 21:16:39 +00:00
|
|
|
(field [k #f])
|
|
|
|
(on-start
|
|
|
|
(flush!)
|
|
|
|
(log-info "Result from suspension: ~v"
|
|
|
|
(react/suspend (actual-k)
|
|
|
|
(on-start (k actual-k)
|
|
|
|
((k) 'first-result))))
|
|
|
|
(flush!)
|
|
|
|
((k) 'second-result)))
|