about summary refs log tree commit diff stats
path: root/worker/types
ModeNameSize
-rw-r--r--messages.go907log stats plain blame
-rw-r--r--worker.go1560log stats plain blame
t/blocking.arc.t?h=main&id=465c5c06e7657fc8b1ef0e383d43e171db6e02de'>465c5c06 ^
e19e7820 ^





5b698455 ^
e19e7820 ^



32aa234d ^
e19e7820 ^







14a1649c ^
e19e7820 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
                                       
                          





                                                                            
                                                                                            



                                                                            
                                                                                                       







                                                             
                                 


                                     
(selective-load "mu.arc" section-level)
(set allow-raw-addresses*)

(reset)
(new-trace "blocking-example")
(add-code
  '((function reader [
      (default-space:space-address <- new space:literal 30:literal/capacity)
      (x:tagged-value 1:channel-address/space:global <- read 1:channel-address/space:global)
     ])
    (function main [
      (default-space:space-address <- new space:literal 30:literal/capacity)
      (1:channel-address <- init-channel 3:literal)
      (2:integer/routine <- fork-helper reader:fn default-space:space-address/globals 50:literal/limit)
      ; write nothing to the channel
;?       (sleep until-routine-done:literal 2:integer/routine)
     ])))
;? (= dump-trace* (obj whitelist '("schedule" "run")))
(run 'main)
;? (prn "completed:")
;? (each r completed-routines*
;?   (prn " " r))
(when (ran-to-completion 'reader)
  (prn "F - reader waits for input"))

(reset)