diff options
Diffstat (limited to 'lib/coroutines/README.md')
| -rw-r--r-- | lib/coroutines/README.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/coroutines/README.md b/lib/coroutines/README.md new file mode 100644 index 00000000..eef923e0 --- /dev/null +++ b/lib/coroutines/README.md @@ -0,0 +1,24 @@ +# Tomo Coroutine Library + +This is a coroutine library built on top of a modified version of +[libaco](https://libaco.org). + +## Example Usage + +```tomo +use coroutines + +func main() + co := Coroutine(func() + say("I'm in the coroutine!") + yield() + say("I'm back in the coroutine!") + ) + >> co + say("I'm in the main func") + >> co.resume() + say("I'm back in the main func") + >> co.resume() + say("I'm back in the main func again") + >> co.resume() +``` |
