template<typename T>
class pw::async2::FutureTask< T, ReturnValuePolicy::kDiscard >
Specialization of FutureTask that discards the return value of the future.
|
| template<typename U = T, typename = std::enable_if_t<!std::is_reference_v<U>>> |
| constexpr | FutureTask () |
| |
| template<typename Arg = T, typename... Args, typename = std::enable_if_t< !std::is_same_v<std::remove_cv_t<std::remove_reference_t<Arg>>, FutureTask> && std::is_constructible_v<T, Arg, Args...>>> |
| constexpr | FutureTask (Arg &&arg, Args &&... args) |
| |
|
| FutureTask (const FutureTask &)=delete |
| |
|
FutureTask & | operator= (const FutureTask &)=delete |
| |
|
| FutureTask (FutureTask &&)=delete |
| |
|
FutureTask & | operator= (FutureTask &&)=delete |
| |
| template<typename U = T, typename = std::enable_if_t< !std::is_same_v<std::remove_cv_t<std::remove_reference_t<U>>, FutureTask> && !std::is_reference_v<T> && std::is_assignable_v<T&, U>>> |
| FutureTask & | operator= (U &&future) |
| |
| template<typename... Args, typename = std::enable_if_t<!std::is_reference_v<T> && std::is_constructible_v<T, Args...>>> |
| void | emplace_future (Args &&... args) |
| |
| template<typename U = T, typename = std::enable_if_t<!std::is_reference_v<U>>> |
| void | reset () |
| |
| constexpr bool | is_pendable () const |
| |
| constexpr bool | is_complete () const |
| | Returns whether the inner future has completed.
|
| |
| constexpr | Task (log::Token name=kDefaultName) |
| |
|
| Task (const Task &)=delete |
| |
|
| Task (Task &&)=delete |
| |
|
Task & | operator= (const Task &)=delete |
| |
|
Task & | operator= (Task &&)=delete |
| |
| virtual | ~Task () |
| |
| Poll | Pend (Context &cx) |
| |
| bool | IsRegistered () const |
| |
| void | Deregister () |
| |
| void | BlockingJoin () |
| |
template<typename T >
template<typename Arg = T, typename... Args, typename = std::enable_if_t< !std::is_same_v<std::remove_cv_t<std::remove_reference_t<Arg>>, FutureTask> && std::is_constructible_v<T, Arg, Args...>>>
| constexpr pw::async2::FutureTask< T, ReturnValuePolicy::kDiscard >::FutureTask |
( |
Arg && |
arg, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineexplicitconstexpr |
Constructs a FutureTask. Forwards arguments to the future's constructor for FutureTasks that own their future. Reference FutureTasks take a mutable reference to their future.
template<typename T >
|
|
inlineoverrideprivatevirtual |
Attempts to advance this Task to completion.
This method should not perform synchronous waiting, as doing so may block the main Dispatcher loop and prevent other Task s from progressing. Because of this, Task s should not invoke blocking Dispatcher methods such as RunUntilComplete.
Tasks should also avoid invoking RunUntilStalled on their own Dispatcher.
Returns Ready if complete, or Pending if the Task was not yet able to complete.
If Pending is returned, the Task must ensure it is woken up when it is able to make progress. To do this, Task::Pend must arrange for Waker::Wake to be called, either by storing a copy of the Waker away to be awoken by another system (such as an interrupt handler).
Implements pw::async2::Task.