Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Message-ID | <in2vpf$jph$1@speranza.aioe.org> (permalink) |
|---|---|
| Newsgroups | comp.lang.c++.moderated, comp.std.c++ |
| From | Dragan Milenkovic <dragan@plusplus.rs> |
| Subject | Re: std::terminate per thread - std vs. MS practice? |
| Organization | Aioe.org NNTP Server |
| References | <in2jpe$cvg$1@dont-email.me> |
| Date | 2011-04-01 07:52 -0600 |
Cross-posted to 2 groups.
On 04/01/2011 12:33 AM, Martin B. wrote: > > 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? I didn't find in the standard that set_terminate will set a handler function globally. Perhaps it is allowed for it to be set on a per-thread level (I may be mistaken). Of course, it has and always will terminate the whole program. It should be specified, though... -- Dragan [ 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 ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Find similar
std::terminate per thread - std vs. MS practice? "Martin B." <0xCDCDCDCD@gmx.at> - 2011-03-31 16:33 -0600 Re: std::terminate per thread - std vs. MS practice? Daniel Krügler <daniel.kruegler@googlemail.com> - 2011-04-01 07:52 -0600 Re: std::terminate per thread - std vs. MS practice? Dragan Milenkovic <dragan@plusplus.rs> - 2011-04-01 07:52 -0600
csiph-web