checkpoint

This commit is contained in:
Antonio SJ Musumeci 2023-04-25 22:36:56 -04:00
parent c96bac9cb8
commit 8e83821f32
5 changed files with 139 additions and 8 deletions

View file

@ -13,13 +13,14 @@ public:
explicit
BoundedQueue(std::size_t max_size_,
bool block_ = true)
: _block(block),
: _block(block_),
_max_size(max_size_)
{
if(_max_size == 0)
_max_size = 1;
}
BoundedQueue(const BoundedQueue&) = delete;
BoundedQueue(BoundedQueue&&) = default;
bool
push(const T& item_)
{