Coroutine spawn options. More...
#include <bio.h>
Data Fields | |
bool | daemon |
Whether this coroutine will be a daemon. | |
size_t | stack_size |
Stack size for the coroutine. | |
bool bio_coro_options_t::daemon |
Whether this coroutine will be a daemon.
A daemon coroutine does not block bio_loop from returning. Daemon coroutines will have a chance to cleanup in bio_terminate.
The application is responsible for signalling daemon coroutines when to terminate. Otherwise, bio_terminate may hang indefinitely.
Daemon coroutines may also check bio_is_terminating.
size_t bio_coro_options_t::stack_size |
Stack size for the coroutine.
This should not be changed from the default unless you know what you are doing. A small size can easily lead to stack overflow.
minicoro (bio's coroutine backend) uses a virtual memory allocator so physical memory will only be committed as needed.