Special handle accessing task information at runtime.
More...
#include <ice/task_handle.hxx>
Special handle accessing task information at runtime.
- Note
- Accessing handles can only be done on task creation, for coroutines that define ice::TaskToken as one of their arguments. In allo ther cases the task will not bookkeep any information related it's lifetime.
◆ TaskHandle() [1/3]
| ice::TaskHandle::TaskHandle |
( |
| ) |
|
|
inlinenoexcept |
◆ TaskHandle() [2/3]
| ice::TaskHandle::TaskHandle |
( |
TaskHandle && | other | ) |
|
|
inlinenoexcept |
◆ TaskHandle() [3/3]
| ice::TaskHandle::TaskHandle |
( |
TaskHandle const & | other | ) |
|
|
inlinenoexcept |
◆ ~TaskHandle()
| ice::TaskHandle::~TaskHandle |
( |
| ) |
|
|
inlinenoexcept |
◆ cancel()
| bool ice::TaskHandle::cancel |
( |
| ) |
|
|
inlinenoexcept |
Sends a cancel request to the connected task.
- Returns
- 'true' if the handle was valid and the task was in the 'Running' state.
◆ has_failed()
| bool ice::TaskHandle::has_failed |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- 'true' if the state value contains the 'Failed' flag.
- Precondition
- The handle needs to be assigned to a valid task.
◆ has_finished()
| bool ice::TaskHandle::has_finished |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- 'true' if the state value contains either 'Succeeded' or 'Failed' flags.
- Precondition
- The handle needs to be assigned to a valid task.
◆ has_succeded()
| bool ice::TaskHandle::has_succeded |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- 'true' if the state value contains the 'Succeeded' flag.
- Precondition
- The handle needs to be assigned to a valid task.
◆ is_running()
| bool ice::TaskHandle::is_running |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- 'true' if the state value contains the 'Running' flag.
- Precondition
- The handle needs to be assigned to a valid task.
◆ is_suspended()
| bool ice::TaskHandle::is_suspended |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- 'true' if the state value contains the 'Suspended' flag.
- Note
- This flag is currently not set.
- Precondition
- The handle needs to be assigned to a valid task.
◆ is_valid()
| bool ice::TaskHandle::is_valid |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- 'true' if the handle was assigned to a task object.
- Precondition
- The handle needs to be assigned to a valid task.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ state()
| auto ice::TaskHandle::state |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- The current state of the assigned task or 'TaskState::Invalid' if not task was assigned to this handle.
◆ was_cancelled()
| bool ice::TaskHandle::was_cancelled |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- 'true' if the state value contains the 'Canceled' flag.
- Precondition
- The handle needs to be assigned to a valid task.
◆ _info
The documentation for this struct was generated from the following file: