Mercurial > repos > rhope
diff kernel.rhope @ 141:f2cb85c53ced
Fix Pause/Resume and rewrite Call Async in Rhope rather than C
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 20 Nov 2010 17:48:22 -0500 |
parents | fc3815b7462f |
children | 7bbdc034e347 |
line wrap: on
line diff
--- a/kernel.rhope Sat Nov 20 20:03:25 2010 +0000 +++ b/kernel.rhope Sat Nov 20 17:48:22 2010 -0500 @@ -287,3 +287,18 @@ ]|[Int32[Trunc UInt16[[data]Index[3]]]] } +_Call Async[func,cont:out] +{ + Resume[cont,0] + { out <- Call[func] } +} +Call Async[func:out] +{ + out <- Pause[_Call Async[func,?]] +} + +Yield[:out] +{ + out <- Pause[Resume[?,Yes]] +} +