Logical collections of asynchronous work.
Learn more: Tasks
Macros | |
| #define | PW_ASYNC_TASK_NAME(name) PW_LOG_TOKEN_EXPR("pw_async2", name) |
| Generates a token for use as a task name. | |
Enumerations | |
| enum class | pw::async2::ReturnValuePolicy : bool { kKeep , kDiscard } |
Whether to store or discard the function's return value in RunOnceTask. | |
| enum class | pw::async2::RunTaskResult { RunTaskResult::kActive , RunTaskResult::kDeregistered , RunTaskResult::kCompleted } |
Functions | |
| template<typename FutureType , typename Func > | |
| pw::async2::CallbackTask (Func &&, FutureType &&) -> CallbackTask< FutureType, Func > | |
| template<typename Func > | |
| pw::async2::FuncTask (Func &&) -> FuncTask< std::decay_t< Func > > | |
| template<typename Func > | |
| pw::async2::RunOnceTask (Func &&) -> RunOnceTask< Func > | |
| template<typename T > | |
| pw::async2::FutureTask (T &&value) -> FutureTask< T > | |
|
strong |
Result from Dispatcher::RunTask. Reports the state of the task when it finished running.
| Enumerator | |
|---|---|
| kActive | The task is still posted to the dispatcher. |
| kDeregistered | The task was removed from the dispatcher by another thread. |
| kCompleted | The task finished running. |