Cogs.Core
|
Manages the set of active task queues in the task manager. More...
Public Member Functions | |
TaskQueues ()=default | |
Default constructs the TaskQueues instance. | |
TaskQueue * | operator[] (TaskQueueId id) |
Retrieve the task queue with the given id. | |
TaskQueueId | createQueue (std::string_view name, const size_t numThreads) |
Create a new TaskQueue with the given name. | |
Public Attributes | |
std::thread::id | mainThreadId |
Id of the main thread. | |
std::vector< std::unique_ptr< TaskQueue > > | queues |
Map of active task queues. | |
Atomic< TaskQueueId > | nextId {0} |
Next available task queue id. | |
Manages the set of active task queues in the task manager.
Definition at line 698 of file TaskManager.cpp.
|
inline |
Create a new TaskQueue with the given name.
name | String name used to identify the task queue and to name its worker threads for debugging purposes. |
customId | Custom identifier to assign to the queue. |
Definition at line 716 of file TaskManager.cpp.
|
inline |
Retrieve the task queue with the given id.
Definition at line 705 of file TaskManager.cpp.
References queues.
std::thread::id Cogs::Core::TaskQueues::mainThreadId |
Id of the main thread.
Definition at line 729 of file TaskManager.cpp.
Atomic<TaskQueueId> Cogs::Core::TaskQueues::nextId {0} |
Next available task queue id.
Definition at line 735 of file TaskManager.cpp.
Referenced by createQueue().
std::vector<std::unique_ptr<TaskQueue> > Cogs::Core::TaskQueues::queues |
Map of active task queues.
Definition at line 732 of file TaskManager.cpp.
Referenced by createQueue(), and operator[]().