From 5144600926190921072
X-Google-Thread: fc772,4e9a6882708535f1,start
X-Google-NewGroupId: yes
X-Google-Thread: f78e5,4e9a6882708535f1,start
X-Google-NewGroupId: yes
X-Google-Attributes: gid5f7b0fd6d8,gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 31 Mar 2011 16:40:01 -0500
Return-Path: <cppmods@mcgurn.dreamhost.com>
Sender: std-cpp-request@vandevoorde.com
Approved: james.dennett@gmail.com 
Message-ID: <in2jpe$cvg$1@dont-email.me>
Newsgroups: comp.lang.c++.moderated,comp.std.c++
From: "Martin B." <0xCDCDCDCD@gmx.at>
Subject: std::terminate per thread - std vs. MS practice? 
Organization: A noiseless patient Spider
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Original-Date: Thu, 31 Mar 2011 21:13:52 +0200
X-Submission-Address: std-c++-submit@vandevoorde.com
To: undisclosed-recipients:;
Date: Thu, 31 Mar 2011 16:33:21 CST
Lines: 40
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-1DonPfnjTSiU9edvMhA8sBbD2iwUXuaICmB93HEuYqX1oSSatifeou+tlVDLY40EE2WMWAhSDNZN6K3!bJdfnKmV5KkWYi5mMMI0X7xwIRmKs6Ue8T0h/FnLMbh+mtvSTpI=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2358
Xref: g2news2.google.com comp.lang.c++.moderated:22088 comp.std.c++:3230


Hi!

Since C++ never talked about threads, MS was quite free to specify[1]:

   set_terminate (CRT)
   -------------------
   (Visual Studio 2010 )

   Installs your own termination routine
   to be called by terminate.
   ...

   In a multithreaded environment, terminate
   functions are maintained separately for each
   thread. Each new thread needs to install its
   own terminate function. Thus, each thread is
   in charge of its own termination handling.

Now, looking at the latest std draft (N3242):
   18.8.3.1 Type terminate_handler

   2 Required behavior: A terminate_handler shall
     terminate execution of the program without
     returning to the caller.

Does anyone have any idea whether the wording for the
terminate_handler might be too strict now that we have threads in the
std?

cheers,
Martin


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



