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() { ... }
return 0;
}
#define zth_async
Run a function as a new fiber.
#define zth_fiber(...)
Prepare every given function to become a fiber by zth_async.
Fiber-aware barrier/gate.
int main_fiber(int argc, char **argv)
Makes the fiber pass the given gate upon exit.
- Examples
- daemon_pattern.cpp.
Definition at line 266 of file async.h.
◆ passOnExit()
| constexpr zth::passOnExit::passOnExit |
( |
Gate & |
g | ) |
|
|
inlineexplicitconstexprnoexcept |
◆ atExit()
| static void zth::passOnExit::atExit |
( |
Fiber & |
f, |
|
|
void * |
g |
|
) |
| |
|
inlinestaticnoexcept |
◆ gate
| Gate& zth::passOnExit::gate |
The documentation for this struct was generated from the following file: