🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2173

Re: Threads and Exceptions

#2173
From: db
Date: Fri, 13 Oct 1995 02:05
28 lines
1781 bytes
rbarris@netcom.com (Robert Barris) wrote:
>I have a question about threads and C++ exceptions.
>
>Is it expected that a C++ compiler environment should provide a mechanism for
>ensuring that exception handling can be done safely in a multi-threaded 
>program? 

I'm not alone in _expecting_ that out of a reasonable compiler!  And
in fact, it's known to be possible.  I work with compilers every day
which do that.

However, it's true that this is a bit beyond scope of the current C++
standards work ... just as for example the POSIX threading standard does
not address a C++ binding for POSIX Threads.  

Some questions to think about:  when threads are canceled, how do they
clean up?  What's the interaction of C and C++ cleanup mechanisms?  And
what good would the POSIX "asynchronous cancellation" mode be to a C++
program?
-- 
David Brownell                        db@Eng.Sun.COM.
Enterprise Distributed Objects

main(a){printf(a,34,a="main(a){printf(a,34,a=%c%s%c,34);}",34);}
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <45k7ie$rgl@engnews2.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
References: <rbarrisDG7L96.F9q@netcom.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 13 Oct 95 02:05:40 GMT
Approved: fjh@cs.mu.oz.au
From: <db@engnews2.Eng.Sun.COM>
Newsgroups: comp.std.c++
Subject: Re: Threads and Exceptions
X-Original-Date: 12 Oct 1995 23:15:26 GMT
Organization: SunSoft, Inc.
Message-ID: <45k7ie$rgl@engnews2.Eng.Sun.COM>
References: <rbarrisDG7L96.F9q@netcom.com>
X-Mailer: Mozilla 1.1 (X11; U; SunOS 5.4 sun4c)
X-Auth: PGPMoose V1.0 PGP comp.std.c++
 iQBFAgUBMH3JzOEDnX0m9pzZAQETwAF9HAv4xE+DxRTAtYPDti36nGlcz3oy/ZVX
 h3elIqPrMMWiEiJjIfptqykxkyn/mDR/
 =lEUW