Boost logo

Boost :

From: Iain.Hanson_at_[hidden]
Date: 2001-06-28 13:50:43

Author: williamkempf (williamkempf_at_[hidden]) at unix,mime
Date: 27/06/01 18:32

>--- In boost_at_y..., "Greg Colvin" <gcolvin_at_u...>
>wrote: > From: <williamkempf_at_h...>
>> > Considering all of the discussion so far, I think this
>slightly > > modified interface is the best design so far:
>> >
>> > class thread :
>boost::noncopyable > > {
>> > public:
>> > thread(detail::threadproc proc); // Starts the
>thread >
>> What happens if proc throws?
>I've been debating what to do here. Currently it's undefined.
>Alternatives are 1) the thread alone dies and 2) the program aborts.
>Option 2 is probably the best, but for now I don't care about this
>specification as it doesn't effect the interface.

I go for thread alone dies. If the parent does not catch the exception
then you will abort. I will be impossible to write reliable systems if
the whole process dies due to one thread throwing an exception. An
example of this would be a client / server system with thread per
client. If one client could bring the whole process down that would
effectively be a denial of service attack on the other clients.


Visit our website at

This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.

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