A co-awaitable object that delegates to a provided func.
Thie provided func may be any callable (function, lambda, or similar) which accepts a Context& and returns a Poll<T>.
Public Types | |
| using | CallableType = Func |
Public Member Functions | |
| constexpr | PendFuncAwaitable (Func &&func) |
| Poll< T > | Pend (pw::async2::Context &cx) |
|
inlineconstexpr |
Create a new objectwhich delegatesPendtopendable`.
See class docs for more details.
|
inline |
Delegates to the stored func to get a result T or wait.
This method will be called if the object is used by co_await.