Boost logo

Boost :

From: Darryl Green (green_at_[hidden])
Date: 2002-08-27 03:03:16

> -----Original Message-----
> From: Eric Woodruff [mailto:Eric.Woodruff_at_[hidden]]
> Sent: Tuesday, 27 August 2002 4:49 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: Re: Re: Boost.threads: interthread
> exceptionconveyance
> Yes, thread exceptions are being discussed. Once the user's
> functor exits
> (via return or thowing an exception), the thread is
> effectively terminated.

It is terminated without the stack being unwound if an uncaught exception is
thrown. Doesn't this effectively require that the functor include a catch
(...) wrapper if stack unwinding is desired? Should it be up to the user or
to the lib to provide this? Wouldn't an alternative to such a wrapping
functor be to allow terminate() to be called but have it use some underlying
mechanism for unwinding the stack and terminating the thread? In any case,
whether it is a wrapping functor or terminate() handler that does it,
something should propogate this to the join as some form of
thread_terminated_by_uncaught_exception exception.

> What happens beyond that is based on the chosen policy or
> implementation
> defined besides the fact that the thread<> is now joinable (giving a
> possible return value and/or exception).

Now joinable? When wasn't it joinable? Do you mean join will now return?

> There is little to discuss about terminate (). The state of the thread
> resources is the responsibility of the implementor (William Kempf?).

So why does Mr Terekhov keep writing:
"the stack shall not be unwound before terminate() is called.

> ----- Original Message -----
> From: Darryl Green
> Newsgroups: gmane.comp.lib.boost.devel
> Sent: Tuesday, 2002:August:27 1:39
> Subject: RE: Re: Re: Boost.threads: interthread exceptionconveyance
> > From: Eric Woodruff [mailto:Eric.Woodruff_at_[hidden]]
> >
> > What is the purpose of that "handler"?
> To ensure that the stack *is* unwound and the thread
> terminates (but not, or
> not always, the process).
> > When would it do its handling?
> When there is an uncaught exception in a thread - that was
> what was being
> discussed (I thought)?
> > The purpose of an exception is to terminate with stack
> unwinding and a
> meaningful object that represents why.
> Terminate what? An operation that encounters an error - yes.
> > Are you looking for a non-exception based alternative to kill
> > a thread with?
> No.
> _______________________________________________
> Unsubscribe & other changes:
> _______________________________________________
> Unsubscribe & other changes:

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