Boost logo

Boost :

From: William E. Kempf (williamkempf_at_[hidden])
Date: 2002-08-08 16:37:08


----- Original Message -----
From: "Anthony Williams" <anthwil_at_[hidden]>

> 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
> terminated.
>
> 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.

This isn't consistent with defined behavior for all platforms I know. And I
agree with their behavior. If main() exits in any manner other than a call
to (platform equivalent) thread_exit() then the process is terminated
immediately. I can't see any way to implement thread_terminate() in a
logical fashion for the main thread given these semantics, and trying to
change those semantics requires the library to somehow enforce calling
thread_exit() when leaving main().

Bill Kempf


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