Logo Search packages:      
Sourcecode: ardour version File versions

void Glib::Cond::wait ( Mutex mutex  ) 

Waits until this thread is woken up on this Cond. The mutex is unlocked before falling asleep and locked again before resuming.

This method can also be used if Glib::thread_init() has not yet been called and will immediately return then.

Parameters:
mutex a Mutex that is currently locked.
Note:
It is important to use the wait() and timed_wait() methods only inside a loop, which checks for the condition to be true as it is not guaranteed that the waiting thread will find it fulfilled, even if the signaling thread left the condition in that state. This is because another thread can have altered the condition, before the waiting thread got the chance to be woken up, even if the condition itself is protected by a Mutex.

Definition at line 360 of file thread.cc.

References Glib::Mutex::gobj().

{
  g_cond_wait(gobject_, mutex.gobj());
}


Generated by  Doxygen 1.6.0   Back to index