33#include <NDEVR/Thread.h>
34#include <NDEVR/Resource.h>
38#if NDEVR_SUPPORTS_THREADING
64 void add(
const std::function<
void()>& callback)
The equivelent of std::vector but with a bit more control.
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
The core String class for the NDEVR API.
Buffer< std::function< void()> > m_functions
The queue of functions awaiting execution.
void run() override
Executes all queued functions sequentially in the thread.
Resource< bool > sv_is_running
Indicates whether the thread queue is currently running.
void add(const std::function< void()> &callback)
Adds a callback function to the queue and starts the thread if not already running.
std::function< void(const char *const)> m_error_callback
Optional callback invoked when an error occurs during execution.
ThreadQueue(const String &name)
Constructs a ThreadQueue with the given name.
Thread()
Constructs a Thread with a default name.
void start()
Starts the thread execution.
The primary namespace for the NDEVR SDK.