Minimal mutex-protected FIFO deque wrapper.
More...
#include <spk_thread_safe_queue.hpp>
|
|
using | value_type = TType |
| | Element type stored by the queue.
|
|
| void | insert (TType &&p_value) |
| | Inserts a new element by move.
|
| void | insert (const TType &p_value) |
| | Inserts a new element by copy.
|
| TType | popFront () |
| | Pops the front element.
|
| TType | popBack () |
| | Pops the back element.
|
| bool | empty () const noexcept |
| | Checks whether the queue is empty.
|
template<typename TType>
class spk::ThreadSafeQueue< TType >
Minimal mutex-protected FIFO deque wrapper.
- Template Parameters
-
| TType | stored element type; must be movable or copyable into the queue. |
Minimal mutex-protected FIFO deque wrapper.
Definition spk_thread_safe_queue.hpp:21
TType popFront()
Pops the front element.
Definition spk_thread_safe_queue.hpp:56
void insert(TType &&p_value)
Inserts a new element by move.
Definition spk_thread_safe_queue.hpp:35
◆ empty()
Checks whether the queue is empty.
- Returns
- true when no elements are stored.
◆ insert() [1/2]
Inserts a new element by copy.
- Parameters
-
| p_value | Value to copy into the queue. |
◆ insert() [2/2]
Inserts a new element by move.
- Parameters
-
| p_value | Value to move into the queue. |
◆ popBack()
Pops the back element.
- Returns
- Moved-out element.
- Exceptions
-
| std::runtime_error | when the queue is empty. |
◆ popFront()
Pops the front element.
- Returns
- Moved-out element.
- Exceptions
-
| std::runtime_error | when the queue is empty. |
The documentation for this class was generated from the following file: