A wrapper around a Task
that allows it to be gracefully cancelled. The base task (TaskType
) must have a non-private, non-final DoPend
.
Public Member Functions | |
void | Cancel () |
Protected Member Functions | |
Poll | DoPend (Context &cx) final |
|
inline |
Cancels the task.
This operation does not immediately remove the task from the dispatcher. Instead, it wakes the task and arranges for it to complete gracefully. To confirm when the task has terminated, check IsRegistered()
.
If the task has already completed, this is a no-op.