1#ifndef IOMANAGER_INCLUDE_IOMANAGER_STDDEQUEUE_HPP_
2#define IOMANAGER_INCLUDE_IOMANAGER_STDDEQUEUE_HPP_
20#include <condition_variable>
47 explicit StdDeQueue(
const std::string& name,
size_t capacity);
Implementations of the Queue class are responsible for relaying data between DAQModules within a DAQ ...
std::chrono::milliseconds duration_t
Base duration type for timeouts.
A Queue Implementation that uses a std::deque as its backend.
void pop(value_t &val, const duration_t &) override
Pop the first value off of the queue.
StdDeQueue & operator=(const StdDeQueue &)=delete
StdDeQueue is not copy-assignable.
std::deque< value_t > m_deque
void push(value_t &&, const duration_t &) override
Push a value onto the Queue.
void try_lock_for(std::unique_lock< std::mutex > &, const duration_t &)
std::atomic< size_t > m_size
bool can_pop() const noexcept override
Determine whether the Queue may be popped from.
StdDeQueue(const std::string &name, size_t capacity)
StdDeQueue Constructor.
bool can_push() const noexcept override
Determine whether the Queue may be pushed onto.
bool try_pop(value_t &val, const duration_t &) override
typename Queue< T >::duration_t duration_t
Type used for expressing timeouts.
std::condition_variable m_no_longer_full
bool try_push(value_t &&, const duration_t &) override
StdDeQueue(StdDeQueue &&)=delete
StdDeQueue is not move-constructible.
std::condition_variable m_no_longer_empty
StdDeQueue(const StdDeQueue &)=delete
StdDeQueue is not copy-constructible.
T value_t
Type of data stored in the StdDeQueue.
size_t get_num_elements() const override
StdDeQueue & operator=(StdDeQueue &&)=delete
StdDeQueue is not move-assignable.
size_t get_capacity() const override
Get the capacity (max size) of the queue.