bio
 
Loading...
Searching...
No Matches
bio_coro_options_t Struct Reference

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.
 

Detailed Description

Coroutine spawn options.

All fields are optional and have defaults.

See also
bio_spawn_ex

Field Documentation

◆ daemon

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.

◆ stack_size

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.


The documentation for this struct was generated from the following file: