🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Threads and Exceptions

#2158
From: Steve Clamage
Date: Tue, 10 Oct 1995 15:02
37 lines
1963 bytes
rbarris@netcom.com (Robert Barris) writes:

>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? 

Threads or other forms of multi-tasking are not addressed in the
C++ draft standard, and are not likely to be.

>...

>One of the compilers I am using (Metrowerks CodeWarrior) provides some 
>functions for getting and setting the state variables associated with 
>each thread, and their thread class makes use of that feature to provide
>for correct exception handling even in multiple threads.

> ...

>What I am wondering is: are these part of the standard or is something 
>like them expected to become part of the standard?

No.

You should expect exceptions to work correctly in a C++ implementation.

But if an implementation provided a multi-tasking capability and
documented that, for example, you had to disable exceptions in order
to use it, I don't believe that would violate any provision
of the standard.
--
Steve Clamage, stephen.clamage@eng.sun.com

[ 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: <45cm7r$d5b@engnews2.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
References: <rbarrisDG7L96.F9q@netcom.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
From: clamage@Eng.sun.com (Steve Clamage)
Newsgroups: comp.std.c++
Subject: Re: Threads and Exceptions
Date: 10 Oct 1995 15:02:10 GMT
Organization: Sun Microsystems Inc., Mountain View, CA
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <45cm7r$d5b@engnews2.Eng.Sun.COM>
References: <rbarrisDG7L96.F9q@netcom.com>
NNTP-Posting-Host: taumet.eng.sun.com
Content-Type: text
X-Nntp-Posting-Host: taumet.eng.sun.com
X-Newsreader: NN version 6.5.0 #21 (NOV)
Content-Length: 1127
X-Lines: 33
Originator: clamage@taumet