Async++ unknown
Async (co_await/co_return) code for C++
Loading...
Searching...
No Matches
asyncpp::channel< T >::read_awaiter Struct Reference

Public Member Functions

read_awaiterresume_on (dispatcher *dsp) noexcept
 Specify a dispatcher to resume after on after reading.
 
constexpr bool await_ready () const noexcept
 
bool await_suspend (coroutine_handle<> hndl)
 
std::optional< T > await_resume ()
 

Public Attributes

channelm_parent
 
read_awaiterm_next {}
 
coroutine_handle m_handle
 
dispatcherm_dispatcher = dispatcher::current()
 
std::optional< T > m_result {std::nullopt}
 

Member Function Documentation

◆ resume_on()

template<typename T >
read_awaiter & asyncpp::channel< T >::read_awaiter::resume_on ( dispatcher * dsp)
inlinenoexcept

Specify a dispatcher to resume after on after reading.

By default the coroutine is resumed on the current dispatcher or inline of the write call if no dispatcher was active at the time of suspension.

Parameters
dspThe dispatcher to resume on or nullptr to resume inside the write call.

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