Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

Example of using a CondVar

 vpr::CondVar mCondVar;   // The condition variable to use

 // --- Set a state and signal everyone else about it --- //
 mCondVar.acquire();
 {
 mState = NEW_STATE;
 mCondVar.signal();
 }
 mCondVar.release();


 // -- Wait for a condition -- //
 mCondVar.acquire();
 {
 while ( mState != DESIRED_STATE ) {
 mCondVar.wait();
 }
 }
 mCondVar.release();

of using a CondVar


Generated on Sun May 2 14:43:00 2004 for VR Juggler Portable Runtime by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002