Boost logo

Boost :

From: Jos Hickson (jos.hickson_at_[hidden])
Date: 2008-02-07 04:42:16


On 07/02/2008, Clark Sims <clark_sims_boost_at_[hidden]> wrote:
> I would like it to deadlock on windows, because I just wrote a large header file, which assumes that a deadlock will occur. In fact, I don't know how I am going to program mutex's and locks, if they act like recursive locks on windows, but scoped locks on linux.
>

We've noticed this variation behaviour in the past when using
boost::mutex. Under the hood on Windows it uses a critical section
which I believe is recursive. Not sure if the rewritten version of
Boost.Threads will do the same.

Sorry, but all I can do is confirm the behaviour. I believe the
Boost.Threads concept documentation for mutex and scoped_lock say that
attempting a recursive lock gives "undefined behaviour" rather than
definitely deadlocking.

Regards,

Jos


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