Boost logo

Threads-Devel :

Subject: [Threads-devel] Fwd: cond.timed_wait() returns way after deadline?
From: Stefan Steuerwald (salsasepp_at_[hidden])
Date: 2009-07-09 08:51:39

Dear threaders,

I have this code:

       unique_lock<mutex> lock(mut);
       system_time deadline = get_system_time() + timeout;
       while( some_pred() ) {
               if( ! cond.timed_wait( lock, deadline ) )

boost 1.37.0 on a linux kernel.
Works fine 99% of the time. Sometimes however, I see timed_wait()
returning several seconds AFTER the deadline (timeout is 5000ms).
I wonder what could cause such behaviour?

Thank you,

Threads-Devel list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at