Re: Threading in new C++ standard
On Apr 20, 7:17 pm, Szabolcs Ferenczi <szabolcs.feren...@gmail.com>
On Apr 20, 6:36 pm, James Kanze <james.ka...@gmail.com> wrote:
On 20 avr, 13:42, Szabolcs Ferenczi <szabolcs.feren...@gmail.com>
On the contrary, what we can see is that C++0x provides a
purely library-based approach for the threading, however, on
the other hand, C ++0x pays a great effort to (re)solve
problems created by the library approach.
You're not making sense. C++0x doesn't (or won't) provide a
purely library-based approach. Threading issues will be
addressed in the language. C++0x makes the distinction between
library issues (the API) and language issues (the memory model
So, you say "threading issues will be addressed in the language."
Good. Let us see. Now, please tell me, just to make some sense:
(1) How you can start a thread of computation in C++0x? Do you have a
language element for it, or do you have just some library stuff?
(2) How can you define mutual exclusion for the concurrent threads of
computations in C++0x? Do you have a language element for it, or do
you have just some library stuff?
(3) How can you make threads synchronised with each other? Do you have
a language element for it, or do you have just some library stuff?
You don't seem to be reading what I am writing. These are not
fundamental threading issues; they're simply means of accessing
the underlying thread model. Since they're just an API, they
are naturally defined in the library; it would be a serious
design error to do otherwise.
The real threading issue is rather when you need 2, and when you
need 3 (and of course, when memory is synchronized between
different threads), not how you access the primitives which
provide them. And that is a pure language issue.
James Kanze (GABI Software) email:email@example.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34