coroutines: 4-space style.
parent
fa310fe054
commit
b9b5c6e927
|
@ -11,7 +11,8 @@ TUPLE: coroutine resumecc exitcc originalcc ;
|
||||||
: cocreate ( quot -- co )
|
: cocreate ( quot -- co )
|
||||||
coroutine new
|
coroutine new
|
||||||
dup current-coro associate
|
dup current-coro associate
|
||||||
[ swapd , , \ with-variables ,
|
[
|
||||||
|
swapd , , \ with-variables ,
|
||||||
"Coroutine has terminated illegally." , \ throw ,
|
"Coroutine has terminated illegally." , \ throw ,
|
||||||
] [ ] make
|
] [ ] make
|
||||||
[ >>resumecc ] [ >>originalcc ] bi ;
|
[ >>resumecc ] [ >>originalcc ] bi ;
|
||||||
|
|
Loading…
Reference in New Issue