Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-02-08 15:28:08


"Jeff Garland" <jeff_at_[hidden]> writes:

> On Sun, 08 Feb 2004 11:23:37 -0500, David Abrahams wrote
>> Christopher Currie <christopher_at_[hidden]> writes:
>>
>> > Slawomir Lisznianski wrote:
>> >> Are there any plans to support handling of exceptions thrown during
>> >> joinable thread execution? I recall Usenet discussions with proposals
>> >> varying from Futures to throwable join():
>> >> try {
>> >> thread.join();
>> >> }
>> >> catch (std::runtime_error& e) {
>> >> ...
>> >> }
>> >> Any ideas?
>> >
>> > Doesn't this require a certain amount of compiler support?
>>
>> Yes.
>
> Why?

Because we don't have the luxury of an extra compilation stage like
Corba does. There's no way to stop unwinding with catch(...), store
whatever arbitrary exception object was thrown, and then rethrow it later.

>> > IIRC, some compilers don't support throwing exceptions across thread
>> > boundaries...
>>
>> Right. This can't be done portably.
>
> I assume you mean without library support and correctly written user code that
> uses the library?

No, I mean without additional compilation resources not built into
C++, or user registration of all possible exception types that can
emanate from a thread.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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