Boost logo

Boost :

From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-09-02 06:28:46

Wolfgang Fertsak <wolfgang.fertsak_at_[hidden]> writes:

> 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

You're not the only person who's spotted this. I'll open a trac
ticket, and fix it when I'm next using my linux box.


Anthony Williams            | Just Software Solutions Ltd
Custom Software Development |
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Boost list run by bdawes at, gregod at, cpdaniel at, john at