[cpp-threads] Re: Exception propogation across threads

Meredith, Alisdair Alisdair.Meredith at uk.renaultf1.com
Thu Feb 22 09:25:20 GMT 2007


> -----Original Message-----
> From: cpp-threads-bounces at decadentplace.org.uk [mailto:cpp-threads-
> bounces at decadentplace.org.uk] On Behalf Of Boehm, Hans
> Sent: 21 February 2007 20:09
> To: C++ threads standardisation; c++std-ext at accu.org
> Subject: RE: [cpp-threads] Re: Exception propogation across threads

> My recollection from the last discussion is that this has the
(probably
> fatal?) flaw that the join may not be executed until next month.  Thus
> you could effectively be hiding the exception for a month.  Since it
> escaped the thread, it was presumably not completely handled, so we
are
> now letting the application run in a bad state for a month,
potentially
> wreaking all sorts of havoc.

And to state the obvious, even this may be optimistic with detached
threads ...

But if the default behaviour is to abort, should we still offer a
facility to transfer exceptions on a join under the user control.

Effectively support for:

void thread_func()
{
  try
  {
  // Do some real work
  }
  catch( ... )
  {
  // Attempt any meaningful recory
  //
  // --> tricky bit <--
  // now transfer the caught exception into
  // a place to propagate on join
  // (Tricky as we have no name for exception object or type)
  }
}

There were two papers in the post-Portland mailing that came up with a
mechanism here, and Dave Abrahams suggested an even cleaner scheme at
the meeting itself.

(links to save looking them up)
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2106.html
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2107.html

AlisdairM
---------------------------------------------------------------------

For further information on Renault F1 visit our web site at www.renaultf1.com. 

WARNING: please ensure that you have adequate virus protection in place before you open or detach any documents attached to this email.

This e-mail may constitute privileged information. If you are not the intended recipient, you have received this confidential email and any attachments transmitted with it in error and you must not disclose, copy, circulate or in any other way use or rely on this information.

E-mails to and from the Renault F1 Team are monitored for operational reasons and in accordance with lawful business practices.

The contents of this email are those of the individual and do not necessarily represent the views of the company.

Please note that this e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. We advise that you understand and observe this lack of security when e-mailing us.

If you have received this email in error please forward to: is.helpdesk at uk.renaultf1.com quoting the sender, then delete the message and any attached documents
---------------------------------------------------------------------



More information about the cpp-threads mailing list