TDME2 1.9.121
|
Realtime consumer/producer queue. More...
#include <tdme/os/threading/RealtimeQueue.h>
Public Member Functions | |
RealtimeQueue (const unsigned int maxElements) | |
Public constructor. More... | |
virtual | ~RealtimeQueue () |
Destructor, removes remaining elements from queue. More... | |
void | stop () |
Requests this queue to be stopped. More... | |
T * | getElement () |
Gets an element from this queue, if no element exists it will immediately return NULL. More... | |
bool | addElement (T *element, const bool declinable) |
Adds an element to this queue. More... | |
Protected Types | |
typedef queue< T * > | RealtimeQueueType |
Protected Attributes | |
RealtimeQueueType | data |
unsigned int | maxElements |
Private Attributes | |
SpinLock | m |
volatile bool | stopRequested |
Realtime consumer/producer queue.
Definition at line 22 of file RealtimeQueue.h.
|
protected |
Definition at line 91 of file RealtimeQueue.h.
|
inline |
Public constructor.
Definition at line 27 of file RealtimeQueue.h.
|
inlinevirtual |
Destructor, removes remaining elements from queue.
Definition at line 37 of file RealtimeQueue.h.
|
inline |
Adds an element to this queue.
element | T* element |
declinable | bool if element is declinable |
Definition at line 79 of file RealtimeQueue.h.
|
inline |
Gets an element from this queue, if no element exists it will immediately return NULL.
Definition at line 56 of file RealtimeQueue.h.
|
inline |
Requests this queue to be stopped.
Definition at line 48 of file RealtimeQueue.h.
|
protected |
Definition at line 92 of file RealtimeQueue.h.
|
private |
Definition at line 96 of file RealtimeQueue.h.
|
protected |
Definition at line 93 of file RealtimeQueue.h.
|
private |
Definition at line 97 of file RealtimeQueue.h.