Waits until this thread is woken up on this Cond, but not longer than until the time, that is specified by abs_time. The mutex is unlocked before falling asleep and locked again before resuming.
This function can also be used, if Glib::thread_init() has not yet been called and will immediately return
|mutex ||a Mutex that is currently locked. |
|abs_time ||a max time to wait.|
- 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 365 of file thread.cc.
return g_cond_timed_wait(gobject_, mutex.gobj(), const_cast<Glib::TimeVal*>(&abs_time));