Helpers for interacting with multiple pendables.
Classes | |
| class | pw::async2::Join< Pendables > |
| class | pw::async2::Selector< Pendables > |
| struct | pw::async2::SelectResult< I, T > |
| struct | pw::async2::AllPendablesCompleted |
Indicates that every pendable within a Selector has completed. More... | |
| class | pw::async2::WakerQueue< kCapacity > |
Functions | |
| 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) |
| 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.
| 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.