Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-10-18 09:33:52


"Iain K.Hanson" <iain.hanson_at_[hidden]> writes:

> > -----Original Message-----
> > [mailto:boost-bounces_at_[hidden]]On Behalf Of David Abrahams
>
>
> > > How so?
> >
> > If a thread leaks a recursive mutex, it has a lock on that mutex, and
> > it can "re-lock" the mutex as many times as it likes without
> > blocking. So the leaking thread itself can't block forever waiting for
> > the mutex.
>
> The point of this iirc is that the thread leaked this due to an uncaught
> exception which would thereby cause the that thread to die.

That reasoning is flawed. There's no reason the exception can't be
caught further up the chain, thereby preventing thread death. The
issue here is whether the lock resource is leaked or not.

-- 
                    David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Building C/C++ Extensions for Python: Dec 9-11, Austin, TX
http://www.enthought.com/training/building_extensions.html

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk