Boost logo

Boost :

From: Anthony Williams (anthwil_at_[hidden])
Date: 2002-08-08 09:20:07

From: William E. Kempf [mailto:williamkempf_at_[hidden]]
Sent: 07 August 2002 17:05
> From: "Iain K.Hanson" <iain.hanson_at_[hidden]>
> > I read this as a request for the standard to be changed to
> accomadate MT
> and
> > therefore an uncaught exception on an unjoined thread could
> result in
> thread
> > death not process termination. Maybe by calling thread_terminate( ).
> Possibly. Ignoring the issues of the main thread, this is
> behavior that
> could be trivially implemented in Boost.Threads (in fact,
> that's the way it
> works today because of a bug). However, this allows
> exceptions to be "lost"
> with no way for the program to detect them. I think it's much more
> appropriate for this to result in a call to terminate(),
> which removes the
> issues of the main thread being different, and requires no
> language changes
> to support this.

I am inclined to go with Iain --- if there is an uncaught exception, it
calls thread_terminate. This is in keeping with the current Standard, where
if there is an uncaught exception, then the current (the only) thread is

You could even provide this behaviour for the main thread of current
systems, by providing a terminate_handler that does thread_terminate, rather
than abort.

Getting at the uncaught exception is another matter -- maybe joining a
terminated thread (as opposed to an exited one) should just throw a
"thread_terminated" exception.


Boost list run by bdawes at, gregod at, cpdaniel at, john at