Values that may not be ready yet.
Learn more: Futures
Concepts | |
| concept | pw::async2::Future |
Classes | |
| class | pw::async2::FutureState |
| class | pw::async2::FutureCore |
| class | pw::async2::BaseFutureList |
| class | pw::async2::CustomFutureList< kGetFutureImpl, kGetFutureCore > |
| class | pw::async2::FutureTask< T > |
| class | pw::async2::Notification |
| A notification that multiple futures can wait on. More... | |
| class | pw::async2::ValueFuture< T > |
| class | pw::async2::ValueFuture< void > |
| class | pw::async2::BroadcastValueProvider< T > |
| class | pw::async2::ValueProvider< T > |
| class | pw::async2::OptionalValueProvider< T > |
| class | pw::async2::OptionalBroadcastValueProvider< T > |
Typedefs | |
| template<typename T > | |
| using | pw::async2::FutureValue = std::conditional_t< std::is_void_v< typename T::value_type >, ReadyType, typename T::value_type > |
| template<auto kMemberPtr> | |
| using | pw::async2::FutureList = CustomFutureList< ContainerOf< kMemberPtr, FutureCore >, MemberOf< kMemberPtr > > |
| using | pw::async2::VoidFuture = ValueFuture< void > |
A ValueFuture that does not return any value, just a completion signal. | |
| template<typename T > | |
| using | pw::async2::OptionalValueFuture = ValueFuture< std::optional< T > > |
A ValueFuture that wraps a std::optional. | |
Functions | |
| template<typename T > | |
| pw::async2::FutureTask (T &&value) -> FutureTask< T > | |
| pw::async2::Notification::Notification (Notification &&)=default | |
| Notification & | pw::async2::Notification::operator= (Notification &&)=default |
| pw::async2::Notification::Notification (const Notification &)=delete | |
| Notification & | pw::async2::Notification::operator= (const Notification &)=delete |
| VoidFuture | pw::async2::Notification::Wait () |
| void | pw::async2::Notification::Notify () |
| Wakes all waiting tasks. | |
| using pw::async2::FutureList = typedef CustomFutureList<ContainerOf<kMemberPtr, FutureCore>, MemberOf<kMemberPtr> > |
A CustomFutureList that uses a pointer to a FutureCore member.
| kMemberPtr | pointer to a FutureCore member of a custom future class |
| using pw::async2::FutureValue = typedef std::conditional_t<std::is_void_v<typename T::value_type>, ReadyType, typename T::value_type> |
The value type of the future. Maps void to ReadyType, so that FutureValue<Future> can always be instantiated and referenced. Use Future::value_type directly if void is preferable.
|
inline |
Returns a future that will resolve when Notify() is called.
Multiple futures can be obtained and will all resolve at once.