blocxx
BLOCXX_NAMESPACE::ThreadCounter Class Reference

#include <ThreadCounter.hpp>

Inheritance diagram for BLOCXX_NAMESPACE::ThreadCounter:
BLOCXX_NAMESPACE::IntrusiveCountableBase

Public Member Functions

 ThreadCounter (Int32 maxThreads)
 
 ~ThreadCounter ()
 
void incThreadCount (const Timeout &timeout)
 
BLOCXX_DEPRECATED void incThreadCount (UInt32 sTimeout, UInt32 usTimeout)
 
void decThreadCount ()
 
Int32 getThreadCount ()
 
void waitForAll (const Timeout &timeout)
 
BLOCXX_DEPRECATED void waitForAll (UInt32 sTimeout, UInt32 usTimeout)
 
void setMax (Int32 maxThreads)
 

Private Member Functions

 ThreadCounter (ThreadCounter const &)
 
ThreadCounteroperator= (ThreadCounter const &)
 

Private Attributes

Int32 m_maxThreads
 
Int32 m_runCount
 
NonRecursiveMutex m_runCountGuard
 
Condition m_runCountCondition
 

Additional Inherited Members

- Protected Member Functions inherited from BLOCXX_NAMESPACE::IntrusiveCountableBase
 IntrusiveCountableBase ()
 
 IntrusiveCountableBase (const IntrusiveCountableBase &)
 
IntrusiveCountableBaseoperator= (const IntrusiveCountableBase &)
 
virtual ~IntrusiveCountableBase ()
 

Detailed Description

Definition at line 54 of file ThreadCounter.hpp.

Constructor & Destructor Documentation

◆ ThreadCounter() [1/2]

BLOCXX_NAMESPACE::ThreadCounter::ThreadCounter ( Int32 maxThreads)

Definition at line 48 of file ThreadCounter.cpp.

◆ ~ThreadCounter()

BLOCXX_NAMESPACE::ThreadCounter::~ThreadCounter ( )

Definition at line 52 of file ThreadCounter.cpp.

◆ ThreadCounter() [2/2]

BLOCXX_NAMESPACE::ThreadCounter::ThreadCounter ( ThreadCounter const & )
private

Member Function Documentation

◆ decThreadCount()

void BLOCXX_NAMESPACE::ThreadCounter::decThreadCount ( )

◆ getThreadCount()

Int32 BLOCXX_NAMESPACE::ThreadCounter::getThreadCount ( )

Definition at line 81 of file ThreadCounter.cpp.

References m_runCount, and m_runCountGuard.

◆ incThreadCount() [1/2]

void BLOCXX_NAMESPACE::ThreadCounter::incThreadCount ( const Timeout & timeout)

◆ incThreadCount() [2/2]

void BLOCXX_NAMESPACE::ThreadCounter::incThreadCount ( UInt32 sTimeout,
UInt32 usTimeout )

Definition at line 55 of file ThreadCounter.cpp.

References incThreadCount(), and BLOCXX_NAMESPACE::Timeout::relative().

◆ operator=()

ThreadCounter & BLOCXX_NAMESPACE::ThreadCounter::operator= ( ThreadCounter const & )
private

◆ setMax()

void BLOCXX_NAMESPACE::ThreadCounter::setMax ( Int32 maxThreads)

◆ waitForAll() [1/2]

void BLOCXX_NAMESPACE::ThreadCounter::waitForAll ( const Timeout & timeout)

◆ waitForAll() [2/2]

void BLOCXX_NAMESPACE::ThreadCounter::waitForAll ( UInt32 sTimeout,
UInt32 usTimeout )

Definition at line 87 of file ThreadCounter.cpp.

References BLOCXX_NAMESPACE::Timeout::relative(), and waitForAll().

Member Data Documentation

◆ m_maxThreads

Int32 BLOCXX_NAMESPACE::ThreadCounter::m_maxThreads
private

Definition at line 69 of file ThreadCounter.hpp.

Referenced by incThreadCount(), and setMax().

◆ m_runCount

Int32 BLOCXX_NAMESPACE::ThreadCounter::m_runCount
private

Definition at line 70 of file ThreadCounter.hpp.

Referenced by decThreadCount(), getThreadCount(), incThreadCount(), and waitForAll().

◆ m_runCountCondition

Condition BLOCXX_NAMESPACE::ThreadCounter::m_runCountCondition
private

Definition at line 72 of file ThreadCounter.hpp.

Referenced by decThreadCount(), incThreadCount(), setMax(), and waitForAll().

◆ m_runCountGuard

NonRecursiveMutex BLOCXX_NAMESPACE::ThreadCounter::m_runCountGuard
private

Definition at line 71 of file ThreadCounter.hpp.

Referenced by decThreadCount(), getThreadCount(), incThreadCount(), setMax(), and waitForAll().


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