ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Re: Re: Re: Threads & Exceptions
by William E. Kempf other posts by this author
Aug 9 2002 1:51PM messages near this date
RE: [boost] Re: Re: Re: Threads & Exceptions | RE: [boost] Re: Re: Mini-review request: aligned_storage.hpp
----- Original Message -----
From: "Darryl Green" <green@[...].au> 
>  Basically, I think the whole "main is special" thing is a nuisance that
has
>  to be lived with. However, as I understand it, there isn't really anything
>  special about the "main thread" only about the main function
(specifically,
>  exiting it)? We obviously cant break existing code that relies on this
>  behaviour, but I think we can assume that the app developer "owns" main()
>  and can stick a catch (...) there at least. It is the other threads that
are
>  harder to control... Assuming we do actually get to the point of allowing
>  threads to terminate due to an uncaught exception without terminating the
>  whole process, the issue of just how to deal with this (which thread(s)
get
>  notified? how? when?) remains an issue, and a more interesting one than
this
>  tedious stuff about having to call terminate() :-)

I agree with the concern.  I hope the standards committee can address this
and remove some of the "main is special" problems.  But as a library
developer I can't really manage that.  But I don't think that simply calling
terminate() results in the problems you think it does.  By setting a
terminate() handler and checking what thread has called it, you can stop the
termination (and more importantly, set up some sort of error handling
here!).

Bill Kempf
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Darryl Green
William E. Kempf

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved