Ogre Video and Audio Plugins
master
|
LocklessQueue template: as provided by Lf3THn4D. More...
#include <LocklessQueue.h>
Public Member Functions | |
LocklessQueue (size_t size) | |
Constructor. More... | |
~LocklessQueue () | |
Destructor. More... | |
bool | push (const Type &obj) |
Push object into the queue. More... | |
bool | empty () const |
Query status. More... | |
bool | pop (Type &obj) |
Pop object out from the queue. More... | |
Private Attributes | |
Type * | m_buffer |
Buffer to keep the queue. More... | |
size_t | m_head |
Head of queue list. More... | |
size_t | m_tail |
Tail of queue list. More... | |
size_t | m_size |
Size of buffer. More... | |
LocklessQueue template: as provided by Lf3THn4D.
Type | Object type to queue. This is a lockless queue system to pass items from one thread to another. |
|
inline |
Constructor.
|
inline |
Destructor.
|
inline |
Query status.
|
inline |
Pop object out from the queue.
|
inline |
Push object into the queue.
|
private |
Buffer to keep the queue.
|
private |
Head of queue list.
|
private |
Size of buffer.
|
private |
Tail of queue list.