Cogs.Core
|
Defines a task meant to be placed in a TaskQueue and handled by a TaskWorker instance. More...
Public Member Functions | |
Task ()=default | |
Default construct a Task. | |
Public Attributes | |
TaskFunction | kernel |
Task kernel, this is the function to run. | |
Task * | parent = nullptr |
Pointer to the parent task, nullptr if no parent task exists. | |
Atomic< int > | active {0} |
Number of active sub-tasks. | |
TaskFlags | flags = TaskFlags::None |
Task flags. | |
std::atomic< uint16_t > | generation = 0 |
Generation counter, used to identify reallocated tasks. | |
std::atomic< int > | continuationCount |
Continuation count. | |
TaskId | continuations [5] |
Registered continuations. | |
Defines a task meant to be placed in a TaskQueue and handled by a TaskWorker instance.
Definition at line 43 of file TaskManager.cpp.
Atomic<int> Cogs::Core::Task::active {0} |
Number of active sub-tasks.
Definition at line 56 of file TaskManager.cpp.
Referenced by Cogs::Core::TaskQueue::canExecute(), Cogs::Core::TaskQueue::createTask(), Cogs::Core::TaskQueue::destroyTask(), Cogs::Core::TaskQueue::finishTask(), and Cogs::Core::TaskQueue::wait().
std::atomic<int> Cogs::Core::Task::continuationCount |
Continuation count.
Definition at line 65 of file TaskManager.cpp.
TaskId Cogs::Core::Task::continuations[5] |
Registered continuations.
Definition at line 68 of file TaskManager.cpp.
TaskFlags Cogs::Core::Task::flags = TaskFlags::None |
Task flags.
Definition at line 59 of file TaskManager.cpp.
Referenced by Cogs::Core::TaskQueue::createTask(), Cogs::Core::TaskQueue::destroyTask(), and Cogs::Core::TaskQueue::finishTask().
std::atomic<uint16_t> Cogs::Core::Task::generation = 0 |
Generation counter, used to identify reallocated tasks.
Definition at line 62 of file TaskManager.cpp.
Referenced by Cogs::Core::TaskQueue::createTask(), Cogs::Core::TaskQueue::destroyTask(), Cogs::Core::TaskQueue::enqueue(), and Cogs::Core::TaskQueue::wait().
TaskFunction Cogs::Core::Task::kernel |
Task kernel, this is the function to run.
Definition at line 50 of file TaskManager.cpp.
Referenced by Cogs::Core::TaskQueue::createTask(), Cogs::Core::TaskQueue::enqueueTask(), and Cogs::Core::TaskQueue::workOnTask().
Task* Cogs::Core::Task::parent = nullptr |
Pointer to the parent task, nullptr if no parent task exists.
Definition at line 53 of file TaskManager.cpp.
Referenced by Cogs::Core::TaskQueue::createTask(), and Cogs::Core::TaskQueue::finishTask().