Boost logo

Boost :

From: Jonathan Biggar (jon_at_[hidden])
Date: 2002-10-17 19:24:07

David Abrahams wrote:
> > > You can't possibly interpret that to cover the case where no thread ever
> > > tries to lock the mutex again after the lock is leaked.
> >
> > It is the degenerative case where the cardinality of the thread set is
> > one, i.e. the thread is blocked waiting for an action the thread itself
> > has not yet performed. In this case, unlocking the mutex, which it
> > didn't do due to the exception.
> It still doesn't look like deadlock in general.
> a. If you have a recursive mutex, the case above doesn't occur
> b. Any number of other threads can hang waiting on the leaked mutex
> lock as long as the leaker doesn't wait on an action by one of those
> threads, and you still don't have a deadlock by our definition.
> I don't see why we have to try to squeeze this bad effect to fit the
> term "deadlock". It's something else; let's call a leak a leak.

Or broaden the definition of "deadlock" to be anytime a thread is
blocked waiting for a lock that it will never acquire.

Jon Biggar
Floorboard Software

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