Re: C++ Threads, what's the status quo?
Gennaro Prota wrote:
On 8 Jan 2007 12:43:24 -0500, James Kanze wrote:
Peter Dimov wrote:
Thant Tessman wrote:
[...]
Shoehorning threading into C++ just seems like a
misallocation of talent and effort--counterproductive even.
Threading (concurrency + shared address space) is already in C++, and
has been for years.
Yes and no. There has been ad hoc solutions which more or less
worked, for a given architecture, OS and compiler, but nothing
formal which the programmer could count on.
Exactly. I guess where the main misunderstanding lies: some people
just don't realize how many guarantees they are assuming which
actually are not. Francis Glassborow already summarized this nicely,
by saying that we need to redesign the C++ virtual machine. I haven't
seen any meaningful objection to his statement.
Yes. I especially liked Thomas Richter's characterization of
the current situation: "[Multithreading] is an extension
provided by your compiler vendor, by several vendors indeed,
that works to a certain degree and has certain quirks in other
degrees you may or may not know about, and that are - given a
good knowledge of your toolchain - easily or hardly avoided."
(By "hardly", I think he means "with difficultly", although the
usual meaning would also fit. But the contrast in "einfach oder
schwierig zu vermeiden" seems more natural.)
Perhaps I'm more sensibilized than most to this problem, since
I've actually had to deal with thread safe code which stopped
being thread safe when we changed compilers.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientie objet/
Beratung in objektorientierter Datenverarbeitung
9 place Simard, 78210 St.-Cyr-l'Icole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]