Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
fishnet::util::BlockingQueue< T > Class Template Reference

Blocking queue implementation. Blocks when no elements are present and take() is called until further elements are added using put(...) More...

#include <BlockingQueue.hpp>

Inheritance diagram for fishnet::util::BlockingQueue< T >:
Collaboration diagram for fishnet::util::BlockingQueue< T >:

Public Member Functions

void putPoisonPill ()
 
const fishnet::Option< T > & getPoisonPill ()
 
virtual void put (fishnet::Option< T > element)
 
fishnet::Option< T > take ()
 
size_t size () const
 

Protected Attributes

std::mutex mutex
 
std::queue< fishnet::Option< T > > queue
 
std::condition_variable waitOnNotEmpty
 
std::condition_variable waitOnNotFull
 

Static Protected Attributes

static fishnet::Option< T > POISON_PILL = std::nullopt
 

Detailed Description

template<typename T>
class fishnet::util::BlockingQueue< T >

Blocking queue implementation. Blocks when no elements are present and take() is called until further elements are added using put(...)

Template Parameters
Tvalue type

Member Function Documentation

◆ getPoisonPill()

template<typename T >
const fishnet::Option< T > & fishnet::util::BlockingQueue< T >::getPoisonPill ( )
inline

◆ put()

template<typename T >
virtual void fishnet::util::BlockingQueue< T >::put ( fishnet::Option< T >  element)
inlinevirtual

◆ putPoisonPill()

template<typename T >
void fishnet::util::BlockingQueue< T >::putPoisonPill ( )
inline

◆ size()

template<typename T >
size_t fishnet::util::BlockingQueue< T >::size ( ) const
inline

◆ take()

template<typename T >
fishnet::Option< T > fishnet::util::BlockingQueue< T >::take ( )
inline

Member Data Documentation

◆ mutex

template<typename T >
std::mutex fishnet::util::BlockingQueue< T >::mutex
mutableprotected

◆ POISON_PILL

template<typename T >
fishnet::Option<T> fishnet::util::BlockingQueue< T >::POISON_PILL = std::nullopt
inlinestaticprotected

◆ queue

template<typename T >
std::queue<fishnet::Option<T> > fishnet::util::BlockingQueue< T >::queue
protected

◆ waitOnNotEmpty

template<typename T >
std::condition_variable fishnet::util::BlockingQueue< T >::waitOnNotEmpty
protected

◆ waitOnNotFull

template<typename T >
std::condition_variable fishnet::util::BlockingQueue< T >::waitOnNotFull
protected

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