From 3640727865687431782
X-Google-Thread: fc772,4e9a6882708535f1
X-Google-NewGroupId: yes
X-Google-Thread: f78e5,4e9a6882708535f1
X-Google-NewGroupId: yes
X-Google-Attributes: gid5f7b0fd6d8,gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII
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: Fri, 01 Apr 2011 08:00:02 -0500
Return-Path: <cppmods@mcgurn.dreamhost.com>
Sender: std-cpp-request@vandevoorde.com
Approved: james.dennett@gmail.com 
Message-ID: <in2vof$o76$1@dont-email.me>
Newsgroups: comp.lang.c++.moderated,comp.std.c++
From: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Subject: Re: std::terminate per thread - std vs. MS practice? 
Organization: A noiseless patient Spider
References: <in2jpe$cvg$1@dont-email.me>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Original-Date: Fri, 01 Apr 2011 00:38:25 +0200
X-Submission-Address: std-c++-submit@vandevoorde.com
To: undisclosed-recipients:;
Date: Fri,  1 Apr 2011 07:52:14 CST
Lines: 56
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-2qCpxbwnvDJ0bdhDedLdYyOVDmd59ike143bWcFtw3ZV94hjmJgjkhNY8g07nWDFGvkiytXQEB4vWJR!rLNPHq5dtWghvqjSNZ0TTgTl6kKlMBTBK0AlsWdaR/R2mIEdNx8=
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: 3002
Xref: g2news2.google.com comp.lang.c++.moderated:22089 comp.std.c++:3231


Am 01.04.2011 00:33, schrieb Martin B.:
>
> 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?

The wording of the current draft reflects the intention
of the committee that there shall be no data race and
no per-thread local terminate handler, see the proposal

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3189.htm

which became accepted in Batavia 2010. Per-thread handlers are often
hard to manage and it is always possible to define a single handler
that again queries a thread-local to get the actual handler, if you
really want, but not vice versa.

HTH & Greetings from Bremen,

Daniel Kr�gler




--
[ 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                      ]



