Lunchbox
1.8.0
|
A thread-safe, lock-free queue with non-blocking access. More...
#include <lfQueue.h>
Public Member Functions | |
LFQueue (const int32_t size) | |
Construct a new queue. | |
~LFQueue () | |
Destruct this queue. | |
bool | isEmpty () const |
void | clear () |
Reset (empty) the queue. | |
void | resize (const int32_t size) |
Resize and reset the queue. | |
bool | pop (T &result) |
Retrieve and pop the front element from the queue. | |
bool | getFront (T &result) |
Retrieve the front element from the queue. | |
bool | push (const T &element) |
Push a new element to the back of the queue. | |
size_t | getCapacity () const |
A thread-safe, lock-free queue with non-blocking access.
Typically used for caches and non-blocking communication between two execution threads.
Current implementation constraints:
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 55 of file lfQueue.h.
Referenced by lunchbox::LFQueue< T >::resize().
|
inline |
|
inline |
|
inline |
Resize and reset the queue.
This method is not thread-safe. The queue has to be empty.
Definition at line 71 of file lfQueue.h.
References lunchbox::LFQueue< T >::isEmpty().