1 (selective-load "mu.arc" section-level)
2 (set allow-raw-addresses*)
5 (new-trace "blocking-example")
8 (default-space:space-address <- new space:literal 30:literal/capacity)
9 (x:tagged-value 1:channel-address/space:global <- read 1:channel-address/space:global)
12 (default-space:space-address <- new space:literal 30:literal/capacity)
13 (1:channel-address <- init-channel 3:literal)
14 (2:integer/routine <- fork-helper reader:fn default-space:space-address/globals 50:literal/limit)
15 ; write nothing to the channel
16 ;? (sleep until-routine-done:literal 2:integer/routine)
18 ;? (= dump-trace* (obj whitelist '("schedule" "run")))
21 ;? (each r completed-routines*
23 (when (ran-to-completion 'reader)
24 (prn "F - reader waits for input"))