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
1.2.14 written by Dimitri van Heesch,
© 1997-2002