This commit is contained in:
Kartik K. Agaram 2014-08-31 11:27:58 -07:00
parent 339001ea83
commit 033d558a10
2 changed files with 3 additions and 5 deletions

4
mu.arc
View File

@ -183,9 +183,9 @@
(= contexts* (queue))
(def run ((o fn-name))
(def run fn-names
(ret result 0
(aif fn-name
(each it fn-names
(enq make-context.it contexts*))
; simple round-robin scheduler
(while (~empty contexts*)

View File

@ -669,9 +669,7 @@
((1 integer) <- literal 3))
(f2
((2 integer) <- literal 4))))
(enq make-context!f1 contexts*)
(enq make-context!f2 contexts*)
(let ninsts (run)
(let ninsts (run 'f1 'f2)
(when (~iso 2 ninsts)
(prn "F - scheduler didn't run the right number of instructions: " ninsts)))
(if (~iso memory* (obj 1 3 2 4))