|
Audio Processing Framework (APF) version 0.5.0
|
Lock-free first-in-first-out (FIFO) queue. More...
#include <apf/lockfreefifo.h>

Public Member Functions | |
| LockFreeFifo (size_t size) | |
| ctor. More... | |
| bool | push (T *item) |
| Add an item to the queue. More... | |
| T * | pop () |
| Get an item and remove it from the queue. More... | |
| bool | empty () const |
| Check if queue is empty. More... | |
Lock-free first-in-first-out (FIFO) queue.
It is thread-safe for single reader/single writer access. One thread may use push() to en-queue items and another thread may use pop() to de-queue items.
Definition at line 51 of file lockfreefifo.h.
|
explicit |
ctor.
| size | desired ring buffer size, gets rounded up to the next power of 2. |
Definition at line 72 of file lockfreefifo.h.
| bool apf::LockFreeFifo< T * >::push | ( | T * | item | ) |
Add an item to the queue.
| item | pointer to an item to be added. |
Definition at line 88 of file lockfreefifo.h.
| T * apf::LockFreeFifo< T * >::pop |
Get an item and remove it from the queue.
Definition at line 119 of file lockfreefifo.h.
| bool apf::LockFreeFifo< T * >::empty |