Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Private Attributes
CAConditionVariable Class Reference
Inheritance diagram for CAConditionVariable:
CAMutex

List of all members.

Public Member Functions

 CAConditionVariable ()
 ~CAConditionVariable ()
SINT32 wait ()
 Waits for a signal or for a timeout.
SINT32 wait (CAMutex &oMutex)
 Very ugly shortly to be deleted, uncommented function!
SINT32 wait (CAMutex *pMutex)
 Very ugly shortly to be deleted, uncommented function!
SINT32 wait (UINT32 msTimeout)
 Waits for a signal or for a timeout.
SINT32 signal ()
 Signals this object.
SINT32 broadcast ()
 Signals this object.

Private Attributes

CAMutexm_pMutex
CASemaphore * m_pSemaphore
UINT32 m_iSleepers

Constructor & Destructor Documentation

References m_pMutex, and m_pSemaphore.


Member Function Documentation

Signals this object.

All threads waiting on this object will awake. Note: lock() must be called before broadcast() and unlock() must be called if proccessing ends.

References E_SUCCESS, E_UNKNOWN, CAMutex::lock(), m_iSleepers, m_pMutex, m_pSemaphore, and CAMutex::unlock().

Referenced by CAThreadPool::addRequest(), CAThreadPool::destroy(), CAAccountingDBInterface::releaseConnection(), and worker_thread_main_loop().

Very ugly shortly to be deleted, uncommented function!

References E_SUCCESS, E_UNKNOWN, CAMutex::lock(), m_iSleepers, CAMutex::m_pMutex, m_pMutex, m_pSemaphore, and CAMutex::unlock().

Very ugly shortly to be deleted, uncommented function!

References E_SUCCESS, E_UNKNOWN, CAMutex::lock(), m_iSleepers, CAMutex::m_pMutex, m_pMutex, m_pSemaphore, and CAMutex::unlock().

Waits for a signal or for a timeout.

Note: lock() must be called before wait() and unlock() must be called if proccessing ends.

Parameters:
msTimeouttimout value in millis seconds
Return values:
E_SUCCESSif signaled
E_TIMEDOUTif timout was reached
E_UNKNOWNif an error occured
Todo:
add something better here....

References E_SUCCESS, E_TIMEDOUT, E_UNKNOWN, getcurrentTime(), m_pMutex, and wait().


Member Data Documentation

Reimplemented from CAMutex.

Referenced by broadcast(), CAConditionVariable(), signal(), wait(), and ~CAConditionVariable().

CASemaphore* CAConditionVariable::m_pSemaphore [private]