Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::util::Condition Class Reference

List of all members.

Detailed Description

a thread condition object

A Condition is used to suspend threads until some condition changes and the waiting threads are notified. Note that threads waiting for a Condition may be notified even if the watched condition has not changed, so waiting should be done in a loop.
The Mutex that created the Condition must be locked before the wait functions can be called.

Note:
This class has ownership transfer semantics. Objects passed to the copy ctor or assigned to another condition will be invalidated.
Author:
Daniel Seibert


Public Types

typedef Uint32 time

Public Member Functions

 Condition (Condition &)
void notify ()
 wakes one waiting thread
void notifyAll ()
 wakes all waiting threads
Conditionoperator= (Condition &)
bool wait (time)
 suspends this thread until it is woken or the given time has passed
void wait ()
 suspends this thread until it is woken
 ~Condition ()


Member Typedef Documentation

typedef Uint32 ONE::util::Condition::time
 


Constructor & Destructor Documentation

ONE::util::Condition::Condition Condition  ) 
 

ONE::util::Condition::~Condition  ) 
 


Member Function Documentation

void ONE::util::Condition::notify  ) 
 

wakes one waiting thread

Exceptions:
EngineException if the operation fails

void ONE::util::Condition::notifyAll  ) 
 

wakes all waiting threads

Notifies all threads waiting for this Condition.

Exceptions:
EngineException if the operation fails

Condition& ONE::util::Condition::operator= Condition  ) 
 

bool ONE::util::Condition::wait time   ) 
 

suspends this thread until it is woken or the given time has passed

This function blocks the current thread until the thread is notified or the timeout passes.

Returns:
true if the thread was notified, false if the operation timed out.
Exceptions:
EngineException if the operation fails

void ONE::util::Condition::wait  ) 
 

suspends this thread until it is woken

Exceptions:
EngineException if the operation fails


Generated on Wed Sep 7 19:03:30 2005 for ONEngine by  doxygen 1.4.3