40 fCond.waiters_count_ = 0;
41 fCond.was_broadcast_ = 0;
42 fCond.sema_ = CreateSemaphore(0,
46 InitializeCriticalSection (&fCond.waiters_count_lock_);
47 fCond.waiters_done_ = CreateEvent(0,
122 DWORD dwMillisecondsNow = (DWORD)((secNow * 1000) + (nanosecNow / 1000000));
123 DWORD dwMilliseconds = (DWORD)((secs * 1000) + (nanoSecs / 1000000));
125 DWORD dwTimeWait = (DWORD)(dwMilliseconds - dwMillisecondsNow);
136 ret = WaitForSingleObject(
fCond.
sema_, dwTimeWait);
164 if (ret == WAIT_TIMEOUT)
195 int have_waiters = 0;
Int_t TimedWait(ULong_t secs, ULong_t nanoSecs=0)
TimedWait() is given an absolute time to wait until.
Int_t Wait()
Wait for the condition variable to be signalled.
CRITICAL_SECTION fCritSect
virtual ~TWin32Condition()
TCondition dtor.
Int_t Signal()
If one or more threads have called Wait(), Signal() wakes up at least one of them, possibly more.
The TTimeStamp encapsulates seconds and ns since EPOCH.
ClassImp(TWin32Condition) TWin32Condition
Create Condition variable.
Int_t Broadcast()
Broadcast is like signal but wakes all threads which have called Wait().
CRITICAL_SECTION waiters_count_lock_