diff options
| author | Tyge Løvset <[email protected]> | 2023-06-13 18:21:04 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-06-13 18:21:04 +0200 |
| commit | 06f3ae1d904d776aea8a78113c16fc30309817ed (patch) | |
| tree | 9dd2332386a4cd4a76000d719bf999d41a05998c /misc | |
| parent | b564ef6bdfcd2437f1b4997f42054c45ccdedbb1 (diff) | |
| download | STC-modified-06f3ae1d904d776aea8a78113c16fc30309817ed.tar.gz STC-modified-06f3ae1d904d776aea8a78113c16fc30309817ed.zip | |
Added cco_closue(Ret, Closure) to define coroutine closure.
Added back cco_await_on(child) calls.
Diffstat (limited to 'misc')
| -rw-r--r-- | misc/examples/cointerleave.c | 2 | ||||
| -rw-r--r-- | misc/examples/coread.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/misc/examples/cointerleave.c b/misc/examples/cointerleave.c index 51b9f39a..1ba7b861 100644 --- a/misc/examples/cointerleave.c +++ b/misc/examples/cointerleave.c @@ -48,7 +48,7 @@ void Use(void) struct Generator g = {{&a}, {&b}}; - cco_run(&g, interleaved(&g)) { + cco_block_on(&g, interleaved) { printf("%d ", g.value); } puts(""); diff --git a/misc/examples/coread.c b/misc/examples/coread.c index 63162ba3..622228c0 100644 --- a/misc/examples/coread.c +++ b/misc/examples/coread.c @@ -32,7 +32,7 @@ int main(void) { struct file_read g = {__FILE__}; int n = 0; - cco_run(&g, file_read(&g)) + cco_block_on(&g, file_read) { printf("%3d %s\n", ++n, cstr_str(&g.line)); //if (n == 10) cco_stop(&g); |
