Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
dev::concurrent_queue< _T, _QueueT > Class Template Reference

Concurrent queue. More...

#include <concurrent_queue.h>

Public Member Functions

template<typename _U >
void push (_U &&_elem)
 
_T pop ()
 

Private Attributes

_QueueT m_queue
 
std::mutex x_mutex
 
std::condition_variable m_cv
 

Detailed Description

template<typename _T, typename _QueueT = std::queue<_T>>
class dev::concurrent_queue< _T, _QueueT >

Concurrent queue.

You can push and pop elements to/from the queue. Pop will block until the queue is not empty. The default backend (_QueueT) is std::queue. It can be changed to any type that has proper push(), pop(), empty() and front() methods.

Definition at line 32 of file concurrent_queue.h.

Member Function Documentation

template<typename _T , typename _QueueT = std::queue<_T>>
_T dev::concurrent_queue< _T, _QueueT >::pop ( )
inline

Definition at line 45 of file concurrent_queue.h.

template<typename _T , typename _QueueT = std::queue<_T>>
template<typename _U >
void dev::concurrent_queue< _T, _QueueT >::push ( _U &&  _elem)
inline

Definition at line 36 of file concurrent_queue.h.

Member Data Documentation

template<typename _T , typename _QueueT = std::queue<_T>>
std::condition_variable dev::concurrent_queue< _T, _QueueT >::m_cv
private

Definition at line 57 of file concurrent_queue.h.

template<typename _T , typename _QueueT = std::queue<_T>>
_QueueT dev::concurrent_queue< _T, _QueueT >::m_queue
private

Definition at line 55 of file concurrent_queue.h.

template<typename _T , typename _QueueT = std::queue<_T>>
std::mutex dev::concurrent_queue< _T, _QueueT >::x_mutex
private

Definition at line 56 of file concurrent_queue.h.


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