|
Boost Users : |
From: Wolfgang Fertsak (wolfgang.fertsak_at_[hidden])
Date: 2008-08-25 11:21:57
In boost 1.35 and 1.36 the implementation of mutex::timed_lock() and
recursive_mutex::timed_lock() for posix-platforms with
BOOST_PTHREAD_HAS_TIMEDLOCK defined looks like this:
bool timed_lock(system_time const & abs_time)
{
struct timespec const timeout=detail::get_timespec(abs_time);
int const res=pthread_mutex_timedlock(&m,&timeout);
BOOST_ASSERT(!res || res==EBUSY);
return !res;
}
The assertion following pthread_mutex_timedlock() always fails in case
of a timeout since the system call returns ETIMEDOUT when timed out and
not EBUSY (according to the open group specification
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_timedlock.html)
Best regards,
Wolfgang
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net