summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/coroutines/cotasks2.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-08-08 12:28:15 +0200
committerTyge Løvset <[email protected]>2023-08-08 15:57:25 +0200
commitc27c266b6c4ae0e5e535b18c3790ee97416412b9 (patch)
tree0b73c9cf644486abbc9213f98c1c308b7511c7dc /misc/examples/coroutines/cotasks2.c
parent9e13d34c82abfeeadcc8697331f9fd3e5e7f2bca (diff)
downloadSTC-modified-c27c266b6c4ae0e5e535b18c3790ee97416412b9.tar.gz
STC-modified-c27c266b6c4ae0e5e535b18c3790ee97416412b9.zip
Reverted cco_cleanup => cco_final. (cco_cleanup deprecated).
Updated generator.c example. Misc internal refactoring.
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 d77a28bc..f6257a7e 100644
--- a/misc/examples/coroutines/cotasks2.c
+++ b/misc/examples/coroutines/cotasks2.c
@@ -53,7 +53,7 @@ int produce_items(struct produce_items* p, cco_runtime* rt)
cco_yield();
}
- cco_cleanup:
+ cco_final:
cstr_drop(&p->str);
puts("done produce");
}
@@ -80,7 +80,7 @@ int consume_items(struct consume_items* c, cco_runtime* rt)
printf("consumed %s\n", cstr_str(&c->produce.str));
}
- cco_cleanup:
+ cco_final:
cco_stop(&c->produce);
cco_resume_task(&c->produce, rt);
puts("done consume");