summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/coroutines/cotasks2.c
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-21 10:49:45 +0200
committertylov <[email protected]>2023-07-21 10:49:45 +0200
commitdbcc13635402bd466675f4f41e865d02abc6f918 (patch)
tree269bbb8e641aaad34b0cca0bbd23c854faa3a960 /misc/examples/coroutines/cotasks2.c
parent2d67f4040f6eecd41f1b864b43c62823ed75aff0 (diff)
downloadSTC-modified-dbcc13635402bd466675f4f41e865d02abc6f918.tar.gz
STC-modified-dbcc13635402bd466675f4f41e865d02abc6f918.zip
NB! Changed some coroutine API for consistency/simplicity: Added full task support.
Diffstat (limited to 'misc/examples/coroutines/cotasks2.c')
-rw-r--r--misc/examples/coroutines/cotasks2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/examples/coroutines/cotasks2.c b/misc/examples/coroutines/cotasks2.c
index 9ca69bda..24a9f23f 100644
--- a/misc/examples/coroutines/cotasks2.c
+++ b/misc/examples/coroutines/cotasks2.c
@@ -77,7 +77,7 @@ int consume_items(struct consume_items* c, cco_runtime* rt)
}
cco_cleanup:
cco_stop(&c->produce);
- cco_resume(&c->produce, rt);
+ cco_task_resume(&c->produce, rt);
puts("done consume");
}
return 0;
@@ -92,7 +92,7 @@ int main(void)
};
int count = 0;
- cco_task_block_on(&consume)
+ cco_task_blocking(&consume)
{
++count;
//cco_sleep(0.001);