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