Makes the fiber pass the given gate upon exit.
More...
#include <async.h>
Makes the fiber pass the given gate upon exit.
Example:
void foo() { ... }
gate.wait();
return 0;
}
Fiber-aware barrier/gate.
Makes the fiber pass the given gate upon exit.
int main_fiber(int argc, char **argv)
#define zth_fiber(...)
Prepare every given function to become a fiber by async.
#define async
Run a function as a new fiber.
- Examples
- daemon_pattern.cpp.
Definition at line 229 of file async.h.
◆ passOnExit()
constexpr zth::passOnExit::passOnExit |
( |
Gate & |
gate | ) |
|
|
inlineexplicitconstexprnoexcept |
◆ ~passOnExit()
virtual zth::passOnExit::~passOnExit |
( |
| ) |
|
|
overridevirtualdefault |
◆ apply()
virtual void zth::passOnExit::apply |
( |
Fiber & |
fiber | ) |
const |
|
inlineoverrideprotectedvirtual |
◆ cleanup()
static void zth::passOnExit::cleanup |
( |
Fiber & |
f, |
|
|
void * |
gate |
|
) |
| |
|
inlinestaticprotected |
The documentation for this class was generated from the following file: