Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2007-09-15 19:55:58


On Sep 15, 2007, at 5:42 PM, Kim Barrett wrote:

> I see that I'm slightly late in responding, but I'll mention this
> anyway:
>
> In the proposed threading model for C++, what happens on an uncaught
> exception in a thread? Is that still terminate? Or is only that thread
> killed off? (I think I remember seeing discussion in C++ committee
> meeting minutes or a proposal that indicated the former, but haven't
> been tracking such things closely. Boost.Thread was relatively
> recently changed from the latter to the former.)
>
> Assuming uncaught exception in a thread => terminate, then the
> sticky_exception only permits cleanup in the throwing thread and not
> in any other threads, which doesn't seem to me to be a whole lot more
> useful than an immediate termination rather than the initial throw.

The intent of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2320.html
  is that a thread which ended in an uncaught exception would
terminate() the application *except* for the thread_interrupt
exception (or exceptions derived from it) which would be silently
swallowed within the runtime such that just that thread would die.
Whether that intent represents popular support on the committee at
this time or not is not something I have a good feel for.

-Howard


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