|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-10-08 13:38:13
Alexander Terekhov wrote:
> Peter Dimov wrote:
> [...]
>> Right. You want to autodetect whether to operate in a throw mode or a
>> nothrow mode. This will never work. :-)
>
> Stop advocating blind use of catch(...), Peter!
_In the current language_ there is _nothing wrong_ with catch(...)+rethrow.
But I don't advocate it in general, or in the above sentence. I don't know
what you mean.
>> The problem is that you can't count on people marking nothrow regions
>> throw() if you can't count on them using operation() correctly (i.e.
>> disabling cancelation in nothrow regions.)
>
> Not quite. It's kinda "performance optimization". The idea is that
> all cancelation points (std::test_thread_cancel() including) shall
> NOT throw *unexpected* cancel exceptions... even if cancelation is
> enabled -- there should be no need to just waste cycles on disable/
> restore of thread cancelation state (quite expensive atomic stuff).
That's quite a different story. What does it mean for a cancel exception to
be "unexpected", by the way?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk