Task

Task
Scaleform::GFx::Task
Declaration
class Task : public RefCountBase<Task, Stat_Default_Mem>;
Description

Task describes a task that can be queued up for potential execution on a different thread. Users can create new tasks by overriding this class and implementing its Execute virtual function. 

Tasks are added for execution by a call to TaskManager::AddTask, at which point they become pending execution. Task objects will be AddRefed by the task manager and then by the container thread; once the task has been completed it will be released.

Enumerations
Enumeration 
Description 
Defines a constant for every type of task that can be queued up; these should include the TaskType bits. 
Defines the state of the tasks. 
TaskType classifies the kind of work that task represents. Type bits are stored as a part of task id and are designed to allow for intelligent distribution of tasks to dedicated threads. 
Methods
Method 
Description 
Virtual function which is overridden to perform the main work of the task. 
Obtains the id describing the task. 
Obtains the current state of the task. 
Obtains the type of the task that is to be executed. 
Detects when the task was removed from the task manager by a call to TaskManager::AbandonTask
Task 
Creates a task initializing it with the correct id. 
File

GFx_TaskManager.h