Template Class mt_queue

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class mt_queue : public rcppsw::patterns::decorator::decorator<std::deque<T>>

A simple multiple-producer/consumer queue with locking. No guarantees of fairness.

Public Functions

mt_queue(void) = default
inline T dequeue()

Get data from the queue. Wait for data if not available.

inline void enqueue(const T &data)

Add data to the queue and notify others.

template<typename ...Args>
inline auto Func(Args&&... args) -> decltype(std::declval<decltype(Member)>().Func(args...))
template<typename ...Args>
inline auto Func(Args&&... args) -> decltype(std::declval<decltype(Member)>().Func(args...))
template<typename ...Args>
inline auto Func(Args&&... args) const -> decltype(std::declval<decltype(rpdecorator::decorator<T>::decoratee())>().Func(args...))
template<typename ...Args>
inline auto Func(Args&&... args) const -> decltype(std::declval<decltype(rpdecorator::decorator<T>::decoratee())>().Func(args...))
template<typename ...Args>
inline auto Func(Args&&... args) const -> decltype(std::declval<decltype(rpdecorator::decorator<T>::decoratee())>().Func(args...))
template<typename ...Args>
inline auto Func(Args&&... args) const -> decltype(std::declval<decltype(rpdecorator::decorator<T>::decoratee())>().Func(args...))