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-04 00:01:57 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-04 00:01:57 -0800
commit4dbf55edbd3fd6a62601bcf8883c821efcd75d5e (patch)
treecf59ef932c928755b1cc6834bd3e2d11bd3dbebe /mu.arc.t
parent02b89cc7be8e7c977d7f1228e9f7f3364978b2c6 (diff)
downloadmu-4dbf55edbd3fd6a62601bcf8883c821efcd75d5e.tar.gz
221
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 32960298..4d77eb6b 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -1691,4 +1691,19 @@
             ((3 integer) <- copy (6 literal))))
   (prn "F - convert-quotes can handle 'defer'"))
 
+; synchronization using channels like in Erlang or Go
+
+(reset)
+(new-trace "channel-new")
+(add-fns
+  '((main
+      ((1 channel-address) <- new-channel (3 literal)))))
+;? (set dump-trace*)
+(let before Memory-in-use-until
+  (run 'main)
+;?   (prn memory*)
+  (if (or (~is 0 (memory* memory*.1))
+          (~is 0 (memory* (+ 1 memory*.1))))
+    (prn "F - 'new-channel' initializes 'first-full and 'first-free to 0")))
+
 (reset)  ; end file with this to persist the trace for the final test