![]() |
Raven Engine v0.1
|
A thread-safe queue for enqueuing and dequeuing jobs. More...
#include <JobQueue.h>
Public Member Functions | |
| void | Push (T job) |
| Enqueues a job into the queue. | |
| std::optional< T > | Pop () |
| Attempts to dequeue a job from the queue. | |
A thread-safe queue for enqueuing and dequeuing jobs.
| T | The type of job or task to store in the queue. Must be MoveConstructible. |
A templated thread-safe queue implementation for storing and retrieving jobs (or any other task type). Internally uses a mutex to protect access to the underlying std::queue. Provides a convenient alias JobQueueType for a queue of Raven::Job instances.
|
inline |
Attempts to dequeue a job from the queue.
|
inline |
Enqueues a job into the queue.
| job | The job to enqueue. |