36 template <
typename T, BlockingBehavior WhenFull, BlockingBehavior WhenEmpty>
66 std::queue<T> itsQueue;
69 mutable std::mutex itsMutex;
74#include <jevois/Types/details/BoundedBufferImpl.H>
Thread-safe synchronized producer/consumer queue.
void push(T &&val)
Push a new data element into the buffer, potentially sleeping or throwing if buffer is full,...
T pop()
Pop oldest data element off of the buffer, potentially sleeping until one is available or throwing if...
BoundedBuffer(size_t const siz)
Create a new BoundedBuffer with no data and a given size.
void clear()
Clear all contents, resetting filled_size() to zero (size() remains unchanged at the max possible siz...
size_t filled_size() const
Current number of items actually in the buffer.
size_t size() const
Max (allocated at construction) size of the buffer.
void push(T const &val)
Push a new data element into the buffer, potentially sleeping or throwing if buffer is full,...
Main namespace for all JeVois classes and functions.