Boost logo

Boost :

From: Scott McCaskill (scott_at_[hidden])
Date: 2001-08-23 10:57:46


> From: "Scott McCaskill" <scott_at_[hidden]>
> > I just remembered another problem that someone else pointed out when
this
> > was discussed a while back--using exceptions for thread cancellation
would
> > mean that you would have to make sure that you never called any
> cancellation
> > points (directly or indirectly) from a destructor. That's a much bigger
> > concern--we couldn't even have scoped_lock then, not and also have
robust
> > cancellation.
>
> True; but robust cancelation requires stack unwinding, since in C++
> destructors release resources. What are the defining characteristics of a
> robust cancelation scheme that does stack unwinding, executing destructors
> and catch() handlers, but is not equivalent to throwing an exception? [BTW
> cancelation points would probably not throw when std::uncaught_exception()
> returns false.]
>

Ahh.. Ok, I hadn't thought of using std::uncaught_exception(); that should
work nicely. I withdraw the above complaint.


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