Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-07-25 11:43:33


Anthony Williams:

> However, it is never safe to destroy any object whilst another thread
> might still be in a member function.

I believe that this is a "POSIX destruction safety" issue. POSIX CVs are
supposed to support such code.

> If you use your mutex to protect the notify too, everything will be fine.

I think that if the mutex doesn't offer "POSIX destruction safety", the code
can still fail. Thread A may be unblocked and destroy the mutex while thread
B is still in mutex::unlock.

http://lists.boost.org/Archives/boost/2004/07/68477.php


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net