coroutines: 4-space style.
parent
8b1a12fb8b
commit
b85058351a
|
|
@ -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