Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | Protected Attributes | List of all members
CountDownLatch Class Reference

#include <CountDownLatch.h>

Public Member Functions

 CountDownLatch (const unsigned int count)
 
virtual ~CountDownLatch ()=default
 
void await (void)
 
template<class Rep , class Period >
bool await (const std::chrono::duration< Rep, Period > &timeout)
 
void countDown (void)
 
unsigned int getCount (void)
 

Protected Attributes

std::mutex m_mutex
 
std::condition_variable m_cv
 
unsigned int m_count = 0
 

Constructor & Destructor Documentation

◆ CountDownLatch()

CountDownLatch::CountDownLatch ( const unsigned int  count)
inlineexplicit

◆ ~CountDownLatch()

virtual CountDownLatch::~CountDownLatch ( )
virtualdefault

Member Function Documentation

◆ await() [1/2]

template<class Rep , class Period >
bool CountDownLatch::await ( const std::chrono::duration< Rep, Period > &  timeout)
inline

◆ await() [2/2]

void CountDownLatch::await ( void  )
inline

◆ countDown()

void CountDownLatch::countDown ( void  )
inline

◆ getCount()

unsigned int CountDownLatch::getCount ( void  )
inline

Member Data Documentation

◆ m_count

unsigned int CountDownLatch::m_count = 0
protected

◆ m_cv

std::condition_variable CountDownLatch::m_cv
protected

◆ m_mutex

std::mutex CountDownLatch::m_mutex
protected

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