Boost logo

Boost Users :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-05-05 10:44:14


Feldman, Yulik said:
> Hi,
>
>
>
> It looks that there is a bug in
> .../boost_1_30_0/libs/thread/src/recursive_mutex.cpp. The bug shows in
> the pthreads implementation of the recursive_mutex when the mutex is
> used with the "condition" synchronization primitive. Here is the
> description of the bug:

You're evaluation of the bug is correct. I'll fix this in CVS shortly.
Do you maybe have a test case for this that I could add to the regression
tests?

BTW, Mr. Terekhov does provide a good resource in his posting on this
subject. I disagree with some points in the thread he posted, but it is
quite true that you absolutely must gaurantee that invariants hold at the
point cond.wait() is called, and that doing so is complicated by the use
of recursive locks. Either avoid recursive locks entirely, avoid
condition variables with recursive mutexes, or be very sure of the design
and the state of your invariants.

-- 
William E. Kempf

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