summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/coread.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-06-13 18:21:04 +0200
committerTyge Løvset <[email protected]>2023-06-13 18:21:04 +0200
commit06f3ae1d904d776aea8a78113c16fc30309817ed (patch)
tree9dd2332386a4cd4a76000d719bf999d41a05998c /misc/examples/coread.c
parentb564ef6bdfcd2437f1b4997f42054c45ccdedbb1 (diff)
downloadSTC-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/examples/coread.c')
-rw-r--r--misc/examples/coread.c2
1 files changed, 1 insertions, 1 deletions
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);