38 #ifndef BLOCXX_THREAD_COUNTER_HPP_INCLUDE_GUARD_
39 #define BLOCXX_THREAD_COUNTER_HPP_INCLUDE_GUARD_
40 #include "blocxx/BLOCXX_config.h"
54 class BLOCXX_COMMON_API ThreadCounter :
public IntrusiveCountableBase
57 ThreadCounter(Int32 maxThreads);
60 void incThreadCount(
const Timeout& timeout);
62 void decThreadCount();
63 Int32 getThreadCount();
65 void waitForAll(
const Timeout& timeout);
67 void setMax(Int32 maxThreads);
71 NonRecursiveMutex m_runCountGuard;
72 Condition m_runCountCondition;
74 ThreadCounter(ThreadCounter
const&);
75 ThreadCounter& operator=(ThreadCounter
const&);
78 class BLOCXX_COMMON_API ThreadCountDecrementer :
public ThreadDoneCallback
82 virtual ~ThreadCountDecrementer();
84 virtual void doNotifyThreadDone(
Thread *);
87 #pragma warning (push)
88 #pragma warning (disable: 4251)