Interface for asynchronous tasks. 更多...
#include <IAsyncTask.h>
Public 成员函数 | |
| virtual void | Cancel ()=0 |
| Cancel this task. 更多... | |
| virtual EAsyncTaskState | GetTaskState ()=0 |
| Gets the current state of the task. 更多... | |
| virtual | ~IAsyncTask () |
| Virtual destructor. | |
Interface for asynchronous tasks.
A asynchronous task is a unit of work that runs in parallel to the caller and may take a considerable amount of time to complete, i.e. several seconds, minutes or even hours. This interface provides mechanisms for tracking and canceling such tasks.
|
pure virtual |
Cancel this task.
If the task is already running, it should make a best effort to abort execution as soon as possible. This method should be implemented in such a way that it returns immediately and does not block the caller.
|
pure virtual |
Gets the current state of the task.