Zth (libzth)
Loading...
Searching...
No Matches
zth::asFuture Struct Reference

Forces the fiber to have a future that outlives the fiber. More...

#include <async.h>

Inheritance diagram for zth::asFuture:
zth::FiberManipulator

Detailed Description

Forces the fiber to have a future that outlives the fiber.

This is a manipulator that calls zth::TypedFiber::withFuture(). Example:

int foo() { ... }
int main_fiber(int argc, char** argv) {
auto f = zth_async foo() << zth::asFuture();
return *f;
}
#define zth_async
Run a function as a new fiber.
Definition async.h:1607
#define zth_fiber(...)
Prepare every given function to become a fiber by zth_async.
Definition async.h:1586
int main_fiber(int argc, char **argv)
Definition main.cpp:11
Forces the fiber to have a future that outlives the fiber.
Definition async.h:310
Examples
2_fibers.cpp.

Definition at line 310 of file async.h.


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