class TaskManager

The TaskManager instance manages our thread pool.

File location: framework/cauldron/framework/inc/core/taskmanager.h

Construction

Return type

Description

Constructor with default behavior.

Methods

Return type

Description

int32_t

Init (uint32_t threadPoolSize)
Initialization function for the TaskManager. Dictates the size of our thread pool.

void

Shuts down the task manager and joins all threads. Called from framework shut down procedures.

void

AddTask (Task & newTask)
Enqueues a task for execution.

void

AddTaskList (std::queue<Task >& newTaskList)
Enqueues multiple tasks for execution.

Detailed description

The TaskManager instance manages our thread pool. Currently, only loading of content is handled asynchronously (the main loop is single threaded).

Construction

TaskManager

Copied!

TaskManager ()

Constructor with default behavior.


Methods

Init

Copied!

int32_t Init (uint32_t threadPoolSize)

Initialization function for the TaskManager. Dictates the size of our thread pool.


Shutdown

Copied!

void Shutdown ()

Shuts down the task manager and joins all threads. Called from framework shut down procedures.


AddTask

Copied!

void AddTask (Task & newTask)

Enqueues a task for execution.


AddTaskList

Copied!

void AddTaskList (std::queue<Task >& newTaskList)

Enqueues multiple tasks for execution.