FX::FXCondition Class Reference

#include <FXThread.h>

List of all members.


Detailed Description

A condition allows one or more threads to synchronize to an event. When a thread calls wait, the associated mutex is unlocked while the thread is blocked. When the condition becomes signaled, the associated mutex is locked and the thread(s) are reawakened.

Public Member Functions

 FXCondition ()
void wait (FXMutex &mtx)
FXbool wait (FXMutex &mtx, FXlong nsec)
void signal ()
void broadcast ()
 ~FXCondition ()

Constructor & Destructor Documentation

FX::FXCondition::FXCondition (  ) 

Initialize the condition.

FX::FXCondition::~FXCondition (  ) 

Delete the condition.


Member Function Documentation

void FX::FXCondition::wait ( FXMutex mtx  ) 

Wait until condition becomes signalled, using given mutex, which must already have been locked prior to this call.

FXbool FX::FXCondition::wait ( FXMutex mtx,
FXlong  nsec 
)

Wait until condition becomes signalled, using given mutex, which must already have been locked prior to this call. Returns TRUE if successful, FALSE if timeout occurred. Note that the wait-time is specified in nanoseconds since the Epoch (Jan 1, 1970).

void FX::FXCondition::signal (  ) 

Wake or unblock a single blocked thread

void FX::FXCondition::broadcast (  ) 

Wake or unblock all blocked threads


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:21:17 2008 for TnFOX by doxygen v1.5.6