|
stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
|
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 |
Function-object process: binds arguments in await, runs the call in yield.