Queue work in response to async events.
Learn more: Wakers
Classes | |
| class | pw::async2::Waker |
Macros | |
| #define | PW_ASYNC_STORE_WAKER(context, waker_or_queue_out, wait_reason_string) |
| #define | PW_ASYNC_TRY_STORE_WAKER( context, waker_or_queue_out, wait_reason_string) |
| #define | PW_ASYNC_CLONE_WAKER(waker_in, waker_or_queue_out, wait_reason_string) |
| #define | PW_ASYNC_TRY_CLONE_WAKER( waker_in, waker_or_queue_out, wait_reason_string) |
| #define PW_ASYNC_CLONE_WAKER | ( | waker_in, | |
| waker_or_queue_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with waker_in into waker_or_queue_out. If the waker cannot be stored into waker_or_queue_out due to the target waker already referencing a task or the queue being full, crashes.
When the stored waker is later awoken with :cpp:func:pw::async2::Waker::Wake, the :cpp:class:pw::async2::Task associated with cx 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_or_queue_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with the current context into waker_or_queue_out. If the waker cannot be stored into waker_or_queue_out due to the target waker already referencing a task or the queue being full, crashes.
When the stored waker is later awoken with :cpp:func:pw::async2::Waker::Wake, the :cpp:class:pw::async2::Task associated with cx 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_or_queue_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with waker_in into waker_or_queue_out. If the waker cannot be stored into waker_or_queue_out due to the target waker already referencing a task or the queue being full, returns false and does not modify it.
When the stored waker is later awoken with :cpp:func:pw::async2::Waker::Wake, the :cpp:class:pw::async2::Task associated with cx 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_or_queue_out, | |||
| wait_reason_string | |||
| ) |
Attempts to store a waker associated with the current context into waker_or_queue_out. If the waker cannot be stored into waker_or_queue_out due to the target waker already referencing a task or the queue being full, returns false and does not modify it.
When the stored waker is later awoken with :cpp:func:pw::async2::Waker::Wake, the :cpp:class:pw::async2::Task associated with cx 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.