Helpers for interacting with multiple pendables.
|
| pw::async2::Join< Pendables >::Join (Pendables &&... pendables) |
| Creates a Join from a series of pendable values.
|
|
Poll< TupleOfOutputRvalues > | pw::async2::Join< Pendables >::Pend (Context &cx) |
|
template<typename... Pendables> |
| pw::async2::Join (Pendables &&...) -> Join< Pendables... > |
|
template<typename... Pendables> |
| pw::async2::Selector (Pendables &&...) -> Selector< Pendables... > |
|
template<typename... Pendables> |
auto | pw::async2::Select (Context &cx, Pendables &&... pendables) |
|
template<typename ResultVariant , typename AllPendablesCompletedHandler , typename... ReadyHandler> |
void | pw::async2::VisitSelectResult (ResultVariant &&variant, AllPendablesCompletedHandler &&on_all_pendables_completed, ReadyHandler &&... on_ready) |
|
◆ Pend()
template<typename... Pendables>
Attempts to complete all of the pendables, returning Ready
with their results if all are complete.
◆ Select()
template<typename... Pendables>
auto pw::async2::Select |
( |
Context & |
cx, |
|
|
Pendables &&... |
pendables |
|
) |
| |
Returns the result of the first of the provided pendables which completes.
This Select
function is intended for single use only. To iterate over all ready pendables, use Selector
directly.
◆ VisitSelectResult()
template<typename ResultVariant , typename AllPendablesCompletedHandler , typename... ReadyHandler>
void pw::async2::VisitSelectResult |
( |
ResultVariant && |
variant, |
|
|
AllPendablesCompletedHandler && |
on_all_pendables_completed, |
|
|
ReadyHandler &&... |
on_ready |
|
) |
| |
Helper for interacting with a ResultVariant
returned by a call to Select
. See Selector
documentation for example usage.