stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
Loading...
Searching...
No Matches
stlab::function_process< R(Args...)> Struct Template Reference

Function-object process: binds arguments in await, runs the call in yield. More...

#include <channel.hpp>

Public Types

using signature

Public Member Functions

template<typename F>
 function_process (F &&f)
template<typename... A>
void await (A &&... args)
 Stores arguments until yield runs the bound call.
auto yield () -> R
 Invokes the function bound by the last await and returns its result.
auto state () const -> process_state_scheduled
 yield_immediate while a call is pending, otherwise await_forever.

Public Attributes

std::function< R(Args...)> _f
std::function< R()> _bound
bool _done

Detailed Description

template<typename R, typename... Args>
struct stlab::function_process< R(Args...)>

Function-object process: binds arguments in await, runs the call in yield.


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