Re: Garbage Collection - The Trash Begins To Pile Up
Peter Dimov wrote:
It is a well-known property of locks that they don't tolerate this kind
of thinking. You _have_ to know what happens while you are holding a
lock (and if you don't - as can happen when you invoke a callback - the
outside code must know that you are calling it under a lock and not
call you back). (Herb Sutter argues that this makes lock-based
programming inherently non-scalable.)
I just finished saying what you said in the first sentence above in
another thread (no pun intended).
You _have_ to be cognizant of what you are doing in multi-threading.
What frightens me is that it seems that some programmers are not yet
aware of this, that they think relief will magically arise from
tweaking C++. We keep saying that, after deep experience in
multi-threading systems, we understand more or less the quasi-terminal
mode of thought that is appropriate in this area, and they keep saying,
"Threading is important. C++ doesn't support threads. Therefore C++
needs to be improved."
Since it seems that it will not be a matter of taking our word for it
(and I would hope not), there is really only one other option: Write a
few, say 5, sophisticated multi-threaded applications, using as many
synchronization primitives as possible, with all kinds of locking,
perhaps with multiple nodes in a network....then come back to this
newsgroup and restart the conversation.
My guess is, after doing that, they will soon forget just exactly what
it was they expected C++, the language, to help them with.
[And if Herb Sutter argues that, it's regrettable, IMO.]
-Le Chaud Lapin-
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]