Skip to content

cf_coroutine_bytes_pushed

Category: coroutine
GitHub: cute_coroutine.h


Returns the number of bytes currently used in the coroutine's storage.

size_t cf_coroutine_bytes_pushed(CF_Coroutine co);
Parameters Description
co The coroutine.

Remarks

Each coroutine has an internal storage of 1k (1024) bytes. The purpose is to allow a formal communication/parameter passing in/out of coroutines via FIFO ordering. These storage are totally optional, and here merely for convenience.

CF_Coroutine
CF_CoroutineFn
CF_CoroutineState
cf_make_coroutine
cf_destroy_coroutine
cf_coroutine_state_to_string
cf_coroutine_resume
cf_coroutine_yield
cf_coroutine_state
cf_coroutine_get_udata
cf_coroutine_push
cf_coroutine_pop
cf_coroutine_currently_running
cf_coroutine_space_remaining