Initialization and cleanup. More...
Data Structures | |
struct | bio_linux_options_t |
Initialization options for Linux. More... | |
struct | bio_windows_options_t |
Initialization options for Windows. More... | |
struct | bio_freebsd_options_t |
Initialization options for FreeBSD. More... | |
struct | bio_allocator_t |
Custom memory allocator. More... | |
struct | bio_options_t |
Initialization options. More... | |
Functions | |
void | bio_init (const bio_options_t *options) |
Initialize the framework. | |
void | bio_loop (void) |
Enter the event loop until there is no running coroutines. | |
void | bio_terminate (void) |
Cleanup. | |
bool | bio_is_terminating (void) |
Check whether the calling coroutine is executing inside bio_terminate. | |
Initialization and cleanup.
A typical program looks like this:
void bio_init | ( | const bio_options_t * | options | ) |
Initialize the framework.
bool bio_is_terminating | ( | void | ) |
Check whether the calling coroutine is executing inside bio_terminate.
Daemon coroutines should check this and terminate.
void bio_loop | ( | void | ) |
Enter the event loop until there is no running coroutines.
void bio_terminate | ( | void | ) |
Cleanup.
It will schedule daemon coroutines to run so they can perform cleanup.