Skip to content

cf_coroutine_reinit

Category: coroutine
GitHub: cute_coroutine.h


Reinitializes a coroutine to run a new function without reallocating memory.

void cf_coroutine_reinit(CF_Coroutine co, CF_CoroutineFn* fn);
Parameters Description
co The coroutine.
fn The new coroutine function to run.

Remarks

Works on both dead and suspended coroutines. The old execution state is abandoned.