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. | |
| 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. | |
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:
Definition at line 46 of file lfQueue.h.
| eq::base::LFQueue< T >::LFQueue | ( | const int32_t | size | ) | [inline] |
| eq::base::LFQueue< T >::~LFQueue | ( | ) | [inline] |
| bool eq::base::LFQueue< T >::isEmpty | ( | ) | const [inline] |
| void eq::base::LFQueue< T >::clear | ( | ) | [inline] |
Reset (empty) the queue.
Definition at line 61 of file lfQueue.h.
Referenced by eq::net::RSPConnection::close().

| bool eq::base::LFQueue< T >::pop | ( | T & | result | ) | [inline] |
| bool eq::base::LFQueue< T >::getFront | ( | T & | result | ) | [inline] |
| bool eq::base::LFQueue< T >::push | ( | const T & | element | ) | [inline] |
Push a new element to the back of the queue.
| element | the element to add. |
Definition at line 112 of file lfQueue.h.
Referenced by eq::net::RSPConnection::readSync(), and eq::net::RSPConnection::write().

0.9.1 by
1.6.1