From: Carl Daniel (cpdaniel_at_[hidden])
Date: 2002-03-13 16:42:04
From: "bill_kempf" <williamkempf_at_[hidden]>
> ... This is no different
> then what happens if there are threads trying to lock a mutex when
> you destroy it, which is, rightfully I believe, defined as undefined
> behavior in both POSIX and Boost.Threads. On Windows platforms it
> results in a return from WaitForSingleObject indicating
> an "abandoned" mutex, but there's a lot of information you can find
> by doing a google search that shows why this is a bad idea.
Actually, that (WAIT_ABANDONED) is what happens if you kill the thread that owns the mutex without releasing the mutex.
If you destroy the mutex while threads are waiting on it, they'll return WAIT_FAILED.
Either way, it's a bad idea :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk