filesaver
|
Provides a lock based queue. More...
#include <WorkQueue.h>
Public Member Functions | |
std::optional< T > | frontWithTimeout (std::chrono::milliseconds timeout) |
T | front () |
void | push (const T &item) |
void | push (T &&item) |
size_t | size () |
Provides a lock based queue.
This is a simple lock based queue.
Definition at line 22 of file WorkQueue.h.
|
inline |
Pop an element from the queue, waiting for until an element is available if it's empty.
Definition at line 59 of file WorkQueue.h.
|
inline |
Try to pop an element from the queue, waiting for timeout
milliseconds for it to be available.
timeout | Amount of time to wait for an element to be available. |
Definition at line 32 of file WorkQueue.h.
|
inline |
Push an element into the queue.
Definition at line 80 of file WorkQueue.h.
|
inline |
Move an element into the queue.
Definition at line 90 of file WorkQueue.h.
|
inline |
Get the queue size.
Definition at line 100 of file WorkQueue.h.