Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Light-weight threading utilities. More...
Namespaces | |
namespace | anonymous_namespace{TaskManager.cpp} |
Classes | |
struct | HandleExceptions |
struct | HandleExceptionsBase |
Wrap a function to handle exceptions. More... | |
struct | HandleExceptionsBase< functionPtr, void(*)(Types...)> |
class | TaskManager |
The task manager creates all worker threads on initialisation, and manages the task queues. More... | |
class | Thread |
Light wrapper around std::thread. More... | |
class | WorkerThread |
Worker thread: process the taskManager queues until killed. More... | |
Typedefs | |
using | QueueItem = std::function< void()> |
Enumerations | |
enum class | TaskPriority { NORMAL , LOW } |
Functions | |
bool | IsMainThread () |
Returns whether the current thread is the 'main' thread (i.e. More... | |
void | SetMainThread () |
Set the current thread as the 'main' thread. More... | |
Variables | |
std::unique_ptr< TaskManager > | g_TaskManager |
Light-weight threading utilities.
Implemented in Threading.cpp. Split from Threading because this is included (via profilers) in most files.
using Threading::QueueItem = typedef std::function<void()> |
|
strong |
bool Threading::IsMainThread | ( | ) |
Returns whether the current thread is the 'main' thread (i.e.
matches an earlier call to SetMainThread).
void Threading::SetMainThread | ( | ) |
Set the current thread as the 'main' thread.
(This is called during engine initialisation.)
std::unique_ptr<TaskManager> Threading::g_TaskManager |