about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-11-21 18:21:15 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-21 18:21:15 -0800
commit95b57986d06935cd9a865357891e26fc46674889 (patch)
tree7397e55eef0a6287213e9359d23e49ab8fdd11b1 /mu.arc.t
parent913c4b5f15b9ded3e26a05320e1874a4ecaadec5 (diff)
downloadmu-95b57986d06935cd9a865357891e26fc46674889.tar.gz
281
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t17
1 files changed, 15 insertions, 2 deletions
diff --git a/mu.arc.t b/mu.arc.t
index d023d2f9..58ac2d3a 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -152,6 +152,7 @@
 (add-fns
   '((main
       ((1 integer) <- copy (23 literal)))))
+;? (set dump-trace*)
 (run 'main)
 ;? (prn memory*)
 (if (~is memory*.1 23)
@@ -1732,10 +1733,14 @@
 (assert (is 1 len.running-routines*))
 ; sleeping routine
 (let routine make-routine!f2
-  (= rep.routine!sleep '(literal 23))
+  (= rep.routine!sleep '(23 literal))
   (set sleeping-routines*.routine))
 ; not yet time for it to wake up
 (= curr-cycle* 23)
+; pretend we just finished a routine
+(= routine* (annotate 'routine (table)))
+;? (set dump-trace*)
+;? (= dump-trace* (obj whitelist '("run" "schedule")))
 (update-scheduler-state)
 (if (~is 1 len.running-routines*)
   (prn "F - scheduler lets routines sleep"))
@@ -1752,10 +1757,12 @@
 (assert (is 1 len.running-routines*))
 ; sleeping routine
 (let routine make-routine!f2
-  (= rep.routine!sleep '(literal 23))
+  (= rep.routine!sleep '(23 literal))
   (set sleeping-routines*.routine))
 ; time for it to wake up
 (= curr-cycle* 24)
+; pretend we just finished a routine
+(= routine* (annotate 'routine (table)))
 (update-scheduler-state)
 (if (~is 2 len.running-routines*)
   (prn "F - scheduler wakes up sleeping routines at the right time"))
@@ -2228,6 +2235,12 @@
   (prn "F - channels are meant to be shared between routines"))
 ;? (quit)
 
+;? (reset)
+;? (new-trace "channel-race")
+;? (add-fns
+;?   '((reader
+;?       ((
+
 ;; Separating concerns
 ;
 ; Lightweight tools can also operate on quoted lists of statements surrounded