From: Jeff Garland (jeff_at_[hidden])
Date: 2004-02-08 13:23:42


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? Corba throws user exceptions across remote procedure calls without
changes to the c++ compiler (of course there is an IDL compiler). Also, Rogue
Wave has a portable library that does this for threading. In both cases the
exception object is serialized across the thread/process boundary and then
rethrown within the correct context. You can see more on this at

http://www.roguewave.com/support/docs/sourcepro/threadsug/9-4.html

> > 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?

Jeff