Queue work in response to async events.
Learn more: Wakers
Classes | |
| class | pw::async2::Waker |
Macros | |
| #define | PW_ASYNC_STORE_WAKER(context, waker_out, wait_reason_string) |
| #define | PW_ASYNC_TRY_STORE_WAKER(context, waker_out, wait_reason_string) |
| #define | PW_ASYNC_CLONE_WAKER(waker_in, waker_out, wait_reason_string) |
| #define | PW_ASYNC_TRY_CLONE_WAKER(waker_in, waker_out, wait_reason_string) |
| #define PW_ASYNC_CLONE_WAKER | ( | waker_in, | |
| waker_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with waker_in into waker_out. Crashes if the waker cannot be stored into waker_out due to the target waker already referencing a task.
When the stored waker is later awoken with pw::async2::Waker::Wake, the pw::async2::Task will be awoken and its DoPend method will be invoked again.
wait_reason_string is a human-readable description of why the task is blocked. If the module configuration option PW_ASYNC2_DEBUG_WAIT_REASON is set, this string will be stored with the waker and reported by Dispatcher::LogRegisteredTasks when its associated task is blocked.
| #define PW_ASYNC_STORE_WAKER | ( | context, | |
| waker_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with the current context into waker_out. Crashes if the waker cannot be stored into waker_out due to the target waker already referencing a task.
When the stored waker is later awoken with pw::async2::Waker::Wake, the pw::async2::Task will be awoken and its DoPend method will be invoked again.
wait_reason_string is a human-readable description of why the task is blocked. If the module configuration option PW_ASYNC2_DEBUG_WAIT_REASON is set, this string will be stored with the waker and reported by Dispatcher::LogRegisteredTasks when its associated task is blocked.
| #define PW_ASYNC_TRY_CLONE_WAKER | ( | waker_in, | |
| waker_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with waker_in into waker_out. If the waker cannot be stored into waker_out due to the target waker already referencing a task, returns false and does not modify it.
When the stored waker is later awoken with pw::async2::Waker::Wake, the pw::async2::Task will be awoken and its DoPend method will be invoked again.
wait_reason_string is a human-readable description of why the task is blocked. If the module configuration option PW_ASYNC2_DEBUG_WAIT_REASON is set, this string will be stored with the waker and reported by Dispatcher::LogRegisteredTasks when its associated task is blocked.
| #define PW_ASYNC_TRY_STORE_WAKER | ( | context, | |
| waker_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with the current context into waker_out. If the waker cannot be stored into waker_out due to the target waker already referencing a task, returns false and does not modify it.
When the stored waker is later awoken with pw::async2::Waker::Wake, the pw::async2::Task will be awoken and its DoPend method will be invoked again.
wait_reason_string is a human-readable description of why the task is blocked. If the module configuration option PW_ASYNC2_DEBUG_WAIT_REASON is set, this string will be stored with the waker and reported by Dispatcher::LogRegisteredTasks when its associated task is blocked.