Represents an interface for an asynchronous operation.
Public Properties | |
| virtual auto | id () const noexcept -> xtd::size=0 |
| Gets an ID for this task instance. | |
Public Methods | |
| virtual auto | start () -> void=0 |
| Starts the task, scheduling it for execution to the current xtd::threading::tasks::task_scheduler. | |
| virtual auto | wait () -> void=0 |
| Waits for the task to complete execution. | |
| virtual auto | wait (xtd::int32 milliseconds_timeout) -> bool=0 |
| Waits for the task to complete execution with specified milliseconds timout. | |
| virtual auto | wait (xtd::int32 milliseconds_timeout, xtd::threading::cancellation_token &cancellation_token) -> bool=0 |
| Waits for the task to complete execution with specified milliseconds timout and cancellation token. | |
| virtual auto | wait (const xtd::time_span &timeout) -> bool=0 |
| Waits for the task to complete execution with specified timout. | |
| virtual auto | wait (const xtd::time_span &timeout, xtd::threading::cancellation_token &cancellation_token) -> bool=0 |
| Waits for the task to complete execution with specified timout and cancellation token. | |
|
nodiscardpure virtualnoexcept |
Gets an ID for this task instance.
|
pure virtual |
Starts the task, scheduling it for execution to the current xtd::threading::tasks::task_scheduler.
|
pure virtual |
Waits for the task to complete execution.
|
pure virtual |
Waits for the task to complete execution with specified milliseconds timout.
| milliseconds_timeout | The number of milliseconds to wait, or xtd::threading::timeout::infinite (-1) to wait indefinitely. |
true if the task completed execution within the allotted time; otherwise, false.
|
pure virtual |
Waits for the task to complete execution with specified milliseconds timout and cancellation token.
| milliseconds_timeout | The number of milliseconds to wait, or xtd::threading::timeout::infinite (-1) to wait indefinitely. |
true if the task completed execution within the allotted time; otherwise, false.
|
pure virtual |
Waits for the task to complete execution with specified timout.
| timeout | A xtd::time_span that represents the number of milliseconds to wait, or a xtd::threading::timeout::infinite_time_span that represents -1 milliseconds to wait indefinitely. |
true if the task completed execution within the allotted time; otherwise, false.
|
pure virtual |
Waits for the task to complete execution with specified timout and cancellation token.
| timeout | A xtd::time_span that represents the number of milliseconds to wait, or a xtd::threading::timeout::infinite_time_span that represents -1 milliseconds to wait indefinitely. |
true if the task completed execution within the allotted time; otherwise, false.