void addTask(Task *task)
Add a task at the head of the list of pending tasks.
size_t getTotalTasksEver()
Returns the number of times addTask has been successfully called.
bool runNextTask()
Run the most recently added task that has not been run yet.
size_t _totalTasksEver
This is used for statistics so that it is not a disaster if this overflows for very long-running comp...
void runTasks()
Runs all pending tasks.
A Task object represents a unit of work that is performed when the method run() is called.
virtual void run(TaskEngine &engine)=0
Does whatever work this task represents.
virtual void dispose()=0
Called when the task is no longer used but run has not and will not be called.
void displayInternalError(const string &msg)
Display msg to standard in a way that indicates that it is an internal error.
This file contains functions for printing strings to standard error.
This header file includes common definitions and is included as the first line of code in every imple...