olp-cpp-sdk
1.21.0
|
A thread-safe container adapter. More...
#include <SyncQueue.h>
Public Member Functions | |
SyncQueue (const SyncQueue &)=delete | |
Non-copyable, non-movable. | |
SyncQueue & | operator= (const SyncQueue &)=delete |
Non-copyable, non-movable. | |
SyncQueue (SyncQueue &&)=delete | |
Non-copyable, non-movable. | |
SyncQueue & | operator= (SyncQueue &&)=delete |
Non-copyable, non-movable. | |
bool | Empty () const |
Checks whether this SyncQueue instance is empty. More... | |
void | Close () |
Closes this SyncQueue instance, deletes all the queued elements, and blocks you from pulling any elements from the queue. | |
bool | Pull (T &element) |
Pulls one element from the SyncQueue instance. More... | |
void | Push (T &&element) |
Forwards the passed element into the SyncQueue instance. More... | |
void | Push (const T &element) |
Copies the passed element into the SyncQueue instance. More... | |
A thread-safe container adapter.
T | The queue item that should be stored inside the buffer. |
Container | The type of the underlying container that should mimic the API of std::queue that provides the following functions:
|
|
inline |
|
inline |
|
inline |
Copies the passed element into the SyncQueue
instance.
element | The const lvalue reference to the element. |
|
inline |
Forwards the passed element into the SyncQueue
instance.
element | The rvalue reference to the element. |