The base class of a runnable task.
#include <Workspace/DataExecution/Execution/task.h>
◆ State
Enumerates Task states.
Enumerator |
---|
Dormant | |
Scheduled | |
Running | |
Aborted | |
Finished | |
◆ TaskBehaviour
Enumerator |
---|
GrowThreadPool | |
AutoDelete | |
RunRemotely | |
◆ Task() [1/2]
Task |
( |
TaskBehaviours |
behaviours | ) |
|
|
explicit |
Constructs a Task.
- Parameters
-
behaviours | If GrowThreadPool set, requests the TaskQueue grow by an additional thread. If AutoDelete set, requests the TaskQueue destroy the Task on completion of the task. If RunRemotely set, requests the TaskQueue run remotely if posible. |
◆ Task() [2/2]
Task |
( |
bool |
growThreadPool, |
|
|
bool |
autoDelete, |
|
|
bool |
runRemotely |
|
) |
| |
|
explicit |
Constructs a Task.
- Parameters
-
growThreadPool | If set, requests the TaskQueue grow by an additional thread |
autoDelete | If set, requests the TaskQueue destroy the Task on completion of the task |
runRemotely | If set, requests the TaskQueue run remotely if posible. |
◆ ~Task()
◆ aborted
◆ doTask()
Performs the work associated with a task. This should be overridden by each task.
Implemented in Updater.
◆ finished
◆ getState()
- Returns
- The Task's current state.
◆ getSupportsRemoteExecution()
bool getSupportsRemoteExecution |
( |
| ) |
const |
Indicates if the task is suitable for remote execution
- Returns
- True if suitable for remote execution and false if it should be run locally.
◆ moveToMainThread()
void moveToMainThread |
( |
| ) |
|
|
virtual |
◆ Q_DECLARE_FLAGS()
◆ run()
◆ setState()
void setState |
( |
State |
state | ) |
|
Sets the task's state.
- Parameters
-
◆ setSupportsRemoteExecution()
void setSupportsRemoteExecution |
( |
bool |
val | ) |
|
Indicates if the task is suitable for remote execution
- Parameters
-
val | True if suitable for remote execution and false if it should be run locally. |
◆ started