Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::BufferedQueueNn< T > Class Template Reference

Cache queue (multi producer-multi consumer) More...

#include <BufferedQueue.h>

Public Member Functions

 BufferedQueueNn (size_t write_limit)
 
bool pop (T &t)
 
bool push (const T &t)
 

Private Member Functions

void swap ()
 

Private Attributes

std::queue< T > q1
 
std::queue< T > q2
 
std::queue< T > & writeQueue = q1
 
std::queue< T > & readQueue = q2
 
std::mutex writeMutex
 
std::mutex readMutex
 
size_t writeLimit
 

Detailed Description

template<class T>
class sese::BufferedQueueNn< T >

Cache queue (multi producer-multi consumer)

Constructor & Destructor Documentation

◆ BufferedQueueNn()

template<class T >
sese::BufferedQueueNn< T >::BufferedQueueNn ( size_t write_limit)
inlineexplicit

Member Function Documentation

◆ pop()

◆ push()

◆ swap()

template<class T >
void sese::BufferedQueueNn< T >::swap ( )
inlineprivate

Member Data Documentation

◆ q1

template<class T >
std::queue<T> sese::BufferedQueueNn< T >::q1
private

◆ q2

template<class T >
std::queue<T> sese::BufferedQueueNn< T >::q2
private

◆ readMutex

template<class T >
std::mutex sese::BufferedQueueNn< T >::readMutex
private

◆ readQueue

template<class T >
std::queue<T>& sese::BufferedQueueNn< T >::readQueue = q2
private

◆ writeLimit

template<class T >
size_t sese::BufferedQueueNn< T >::writeLimit
private

◆ writeMutex

template<class T >
std::mutex sese::BufferedQueueNn< T >::writeMutex
private

◆ writeQueue

template<class T >
std::queue<T>& sese::BufferedQueueNn< T >::writeQueue = q1
private

The documentation for this class was generated from the following file: