236 static void Unlink(
Node *pNode);
Attachment()
Definition attachment.h:26
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
int InProgress() const
Test whether the task has been started and has not yet finished.
virtual int CheckStateChange(int nFrom, int nTo)
Approve or refuse a lifecycle change.
virtual int Poll()=0
Perform one pass of the task's work.
int GetQuiet()
Test whether the task suppresses its progress report.
Task(const Task &other)
Construct a task with its own fresh node.
virtual float Progress()=0
Report how far the task has progressed.
HxStr GetStatus() const
Read the task's display title.
virtual ~Task()
Unlink the task and release its node.
int Suspend()
Unlink the task and retain its position.
int State() const
Read the task's lifecycle position.
Task & operator=(const Task &other)
Reset the task to kTaskStateIdle.
int Start(int bBlocking)
Begin running the task.
static int PollTasks()
Poll every running task once.
virtual HxStr Name() const =0
Report the task's display title.
float GetProgress()
Read how far the task has progressed.
int Finish()
Retire the task.
virtual int Quiet()
Report whether the task suppresses its progress report.
int Reset()
Return the task to kTaskStateIdle so that it can be started again.
One position in the run ring, allocated separately from the task it refers to.
Definition task.h:40
int mState
Definition task.h:42
Node * mNext
Definition task.h:43
Task * mTask
Definition task.h:41
Node * mPrev
Definition task.h:44
TaskState
The lifecycle position of a Task, stored in its scheduler node.
Definition task.h:7
@ kTaskStateSuspended
Definition task.h:10
@ kTaskStateRunning
Definition task.h:9
@ kTaskStateIdle
Definition task.h:8
@ kTaskStateFinished
Definition task.h:11
Task::Node * g_pRunningTasks
Head of the circular run ring, or null when no task is running.