Thread Safe queue.
More...
#include <TSQueue.hpp>
|
| | TSQueue ()=default |
| |
| | TSQueue (const TSQueue< T > &)=delete |
| |
| | ~TSQueue () |
| |
| const T & | front () |
| | Returns a constant reference to the first element of the queue. More...
|
| |
| const T & | back () |
| | Returns a constant reference to the last element of the queue. More...
|
| |
| T | popFront () |
| | Removes and returns the first element of the queue. More...
|
| |
| T | popBack () |
| | Removes and returns the last element of the queue. More...
|
| |
| void | pushFront (const T &t) |
| | Adds an element to the beginning of the queue. More...
|
| |
| void | pushBack (const T &t) |
| | Adds an element to the beginning of the queue. More...
|
| |
| bool | empty () |
| | Returns true if the queue is empty, false otherwise. More...
|
| |
| size_t | count () |
| | Returns the number of elements in the queue. More...
|
| |
| void | clear () |
| | Removes every elements in the queue. More...
|
| |
| template<typename TimeType > |
| void | waitFor (std::chrono::duration< TimeType > time) |
| | Block a thread until the queue is non empty or the timeout is reached. More...
|
| |
template<typename T>
class Babel::TSQueue< T >
Thread Safe queue.
- Note
- Should be the same functionality as std::queue
◆ TSQueue() [1/2]
◆ TSQueue() [2/2]
◆ ~TSQueue()
◆ back()
Returns a constant reference to the last element of the queue.
◆ clear()
Removes every elements in the queue.
◆ count()
Returns the number of elements in the queue.
◆ empty()
Returns true if the queue is empty, false otherwise.
◆ front()
Returns a constant reference to the first element of the queue.
◆ popBack()
Removes and returns the last element of the queue.
◆ popFront()
Removes and returns the first element of the queue.
◆ pushBack()
Adds an element to the beginning of the queue.
◆ pushFront()
Adds an element to the beginning of the queue.
◆ waitFor()
template<typename T >
template<typename TimeType >
| void Babel::TSQueue< T >::waitFor |
( |
std::chrono::duration< TimeType > |
time | ) |
|
|
inline |
Block a thread until the queue is non empty or the timeout is reached.
- Parameters
-
| time | The number time before release |
◆ _blocker
◆ _mutex
◆ _queue
◆ _waitMutex
The documentation for this class was generated from the following file: