10#include <boost/assert.hpp>
30 requires std::convertible_to<U, T>
Definition bounded_queue.h:23
T get()
Pop an item from the queue.
Definition bounded_queue.h:45
BoundedQueue(unsigned capacity)
Definition bounded_queue.h:25
void put(U &&elem)
Push an item to the queue.
Definition bounded_queue.h:29
unsigned size_
Definition bounded_queue.h:69
bool empty() const
size() == 0
Definition bounded_queue.h:59
bool hasSpace() const
size() < capacity()
Definition bounded_queue.h:61
unsigned head_
Definition bounded_queue.h:66
std::vector< T > queue_
Definition bounded_queue.h:64
unsigned capacity() const
Maximum number of contained items.
Definition bounded_queue.h:57
unsigned tail_
Definition bounded_queue.h:68
unsigned size() const
Current number of contained items.
Definition bounded_queue.h:55
Definition async_work.cc:17
Definition exception.h:19