From: Preston A. Elder (prez_at_[hidden])
Date: 2007-11-14 07:59:22
On Wed, 14 Nov 2007 12:34:01 +0000, Anthony Williams wrote:
>>> >> Excellent. I think there's a bug in your timed_lock --- it doesn't
>>> >> quit when the timeout expires. Easy to fix --- just check the
>>> >> return value from m_cond.timed_wait.
>> t0: thread A holds the lock
>> t1: thread B calls lock() and does internal try_lock() twice (both
>> fail) t2: thread A calls unlock() and does notify_all() (nobody's
>> waiting) t3: thread B enters wait() on condvar and waits and waits and
OK, these are both fixed and checked in to my SVN:
The timed lock issue was silliness on my part. My original
implementation using the old threading interface did not have this bug,
but I rushed trying to convert it from the old interface to the new, and
since I don't use timed_lock that much, did not test it. My bad.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk