From: Bill Seymour (bsey_at_[hidden])
Date: 2001-10-24 13:38:40
> --- In boost_at_y..., "Anson Tsao" <ansont_at_m...> wrote:
> > 2) WaitForSingleObject return values that are not WAIT_OBJECT_0 are
> > asserted in a number of places. They are runtime conditions that can
> > return WAIT_ABANDONED, should probably throw an exception instead.
> Possibly. AFAIK, however, the MS platform is the only one that has
> the concept of abandoned mutexes, so I hesitate to add an exception
> type for this platform specific case. I'll give it much greater
> thought now that it's raised by someone else.
I think the question is whether the error return values
should cause assertions or throw exceptions; and Anson
notes that they represent run-time, not compile-time,
As for WAIT_ABANDONED, it means that the thread or process
that had the mutex locked has halted for some reason, so
it's reasonable to consider the mutex no longer locked.
I've always treated WAIT_OBJECT_0 and WAIT_ABANDONED as
equivalent; and Bill's finding that other platforms don't
even have the concept of abandoned mutexes would seem to
support that view.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk