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

Change the stack size of a fiber returned by zth_async. More...

#include <async.h>

Inheritance diagram for zth::setStackSize:
zth::FiberManipulator

Public Member Functions

constexpr setStackSize (size_t s) noexcept
 

Public Attributes

size_t stack
 

Detailed Description

Change the stack size of a fiber returned by zth_async.

This is a manipulator that calls zth::Fiber::setStackSize(). Example:

void foo() { ... }
int main_fiber(int argc, char** argv) {
zth_async foo() << zth::setStackSize(0x10000);
return 0;
}
#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
Change the stack size of a fiber returned by zth_async.
Definition async.h:175

Definition at line 175 of file async.h.

Constructor & Destructor Documentation

◆ setStackSize()

constexpr zth::setStackSize::setStackSize ( size_t  s)
inlineexplicitconstexprnoexcept

Definition at line 178 of file async.h.

Member Data Documentation

◆ stack

size_t zth::setStackSize::stack

Definition at line 176 of file async.h.


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