Zth (libzth)
zth::setStackSize Class Reference

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

#include <async.h>

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

Public Member Functions

constexpr setStackSize (size_t stack) noexcept
 
virtual ~setStackSize () override=default
 

Protected Member Functions

virtual void apply (Fiber &fiber) const override
 
- Protected Member Functions inherited from zth::FiberManipulator
constexpr FiberManipulator () noexcept=default
 
virtual ~FiberManipulator ()=default
 

Detailed Description

Change the stack size of a fiber returned by async.

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

void foo() { ... }
int main_fiber(int argc, char** argv) {
async foo() << zth::setStackSize(0x10000);
return 0;
}
Change the stack size of a fiber returned by async.
Definition: async.h:145
int main_fiber(int argc, char **argv)
Definition: main.cpp:14
#define zth_fiber(...)
Prepare every given function to become a fiber by async.
Definition: async.h:765
#define async
Run a function as a new fiber.
Definition: async.h:789

Definition at line 145 of file async.h.

Constructor & Destructor Documentation

◆ setStackSize()

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

Definition at line 147 of file async.h.

◆ ~setStackSize()

virtual zth::setStackSize::~setStackSize ( )
overridevirtualdefault

Member Function Documentation

◆ apply()

virtual void zth::setStackSize::apply ( Fiber fiber) const
inlineoverrideprotectedvirtual

Implements zth::FiberManipulator.

Definition at line 152 of file async.h.


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