Zth (libzth)
Loading...
Searching...
No Matches
zth::joiner Class Reference

RAII class to join fibers and futures on destruction. More...

#include <async.h>

Public Member Functions

 joiner () noexcept
 
template<typename... J>
 joiner (J &&... j)
 
 ~joiner ()
 

Detailed Description

RAII class to join fibers and futures on destruction.

Usage:

{
zth::joiner j(zth::fiber(...), ...);
// do work
// When j goes out of scope, all fibers and futures are joined.
}
RAII class to join fibers and futures on destruction.
Definition async.h:1375
fiber_type< F >::fiber fiber(F &&f, Args &&... args)
Create and start a new fiber.
Definition async.h:1192
Examples
socks.cpp.

Definition at line 1375 of file async.h.

Constructor & Destructor Documentation

◆ joiner() [1/2]

zth::joiner::joiner ( )
inlinenoexcept

Definition at line 1378 of file async.h.

◆ joiner() [2/2]

template<typename... J>
zth::joiner::joiner ( J &&...  j)
inlineexplicit

Definition at line 1476 of file async.h.

◆ ~joiner()

zth::joiner::~joiner ( )
inline

Definition at line 1484 of file async.h.


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