Boost logo

Threads-Devel :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-03-02 10:50:23


Anthony Williams wrote:

>It is legal to destroy a locked mutex object. The assert does not check for
>that case --- it checks whether CloseHandle failed. CloseHandle will fail if
>the handle is invalid, which therefore indicates a corrupt system, so it is a
>good idea to terminate the app.
>
>
So I understand you right, you are suggesting to fix the bug by
first first locking the mutex and then CloseHandle?
But if so, what about the changed semantics?
The pthreads implementation does not wait for the lock to get
free, but simply aborts the program in this case.

Roland


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk