Cogs.Core
|
Task worker executing Task instances retrieved from a TaskQueue. More...
Public Member Functions | |
TaskWorker (TaskQueue *taskQueue, uint32_t workerIx, const std::string &name) | |
Construct a TaskWorker with the given taskQueue. | |
void | operator() () |
Executes the task worker. | |
Public Attributes | |
TaskQueue * | taskQueue |
Task queue to retrieve Task instances from. | |
uint32_t | workerIx = 0 |
std::string | name |
Task worker executing Task instances retrieved from a TaskQueue.
Definition at line 635 of file TaskManager.cpp.
|
inline |
Construct a TaskWorker with the given taskQueue.
Definition at line 639 of file TaskManager.cpp.
|
inline |
Executes the task worker.
The worker will loop as long as there are available tasks from the TaskQueue.
Definition at line 648 of file TaskManager.cpp.
References Cogs::Core::TaskQueue::getNextTask(), taskQueue, and Cogs::Core::TaskQueue::workOnTask().
std::string Cogs::Core::TaskWorker::name |
Definition at line 667 of file TaskManager.cpp.
TaskQueue* Cogs::Core::TaskWorker::taskQueue |
Task queue to retrieve Task instances from.
Definition at line 665 of file TaskManager.cpp.
Referenced by operator()().
uint32_t Cogs::Core::TaskWorker::workerIx = 0 |
Definition at line 666 of file TaskManager.cpp.