1. This newsgroup is only for discussion of the ISO
standard C++ language.
See http://www.slack.net/~shiva/welcome.txt
2. Standard C++ offers no direct support for 'threads'.
You'll need platform/implementation-specific extensions
or a third party library.
> I read about pthreads in a book about UNIX network programming.
'pthreads' is a UNIX entity, not a C++ one.
> I know that boost offers a thread library.
Yes. Have you actually looked at it to determine
whether it suits your needs?
> What I'm looking for is a good book which is a reliable guide
> in the C++/Thread field.
I doubt there is such a thing, since threading is entirely
dependent upon the host platform. What you need is information
on 'threading and C++ for <insert platform here>.
-Mike
>Thomas Porschberg <ma...@porschberg.de> wrote in message
>news:m3llvcw...@redrat.quark.de...
>> What I'm looking for is a good book which is a reliable guide
>> in the C++/Thread field.
>I doubt there is such a thing, since threading is entirely
>dependent upon the host platform. What you need is information
>on 'threading and C++ for <insert platform here>.
Well, here's a book I read:
Object-Oriented Multithreading Using C++
by Cameron Hughes (Author), Tracey Hughes (Author)
I didn't care too much for it, but it got decent reviews on amazon.com:
http://www.amazon.com/exec/obidos/tg/detail/-/0471180122/103-4483277-5446230?vi=glance
and came up "highly recommended" on accu.org:
http://www.accu.org/cgi-bin/accu/rvout.cgi?from=0hr_advanced_c__&file=o001678a
--Yu
I place no credibility upon the reviews posted by
Amazon, for reasons which should be obvious.
>
> and came up "highly recommended" on accu.org:
>
>
http://www.accu.org/cgi-bin/accu/rvout.cgi?from=0hr_advanced_c__&file=o00167
8a
I don't doubt this is a fine book, but note the 'categories'
indicated therein: "MS Windows", and "Advanced C++".
Any example code, etc. must needs use platform-specifics.
It seems they chose to use Windows.
My point was that the 'topic' "threading with C++"
is meaningless without a specific context (i.e. platform),
and that each platform can and does implement it in its
own way.
-Mike
I don't totally discount amazon.com reviews. Although the number of
stars seem to have become inflated compared to a few years ago, without
too much effort you can still tell which review entries came from real
readers.
Th Hughes books purports to be a "platform independent" treatment,
and if I remember correctly there are wrapper classes for the OS-level
entities. Yes, there are definitely platform-dependent subtleties, but
I think you would be going too far by saying there are no conceptual
commonalities. I know it seems to be the common wisdom of the regulars
here to stress the platform dependency, but in my experience having
programmed in C++/pthreads it was then much easier to do C++/VxWorks
or even Java threads. And the feel of programming threads with objects
is quite different from programming threads in a procedural language
or framework, don't you think?
My major complaint about the book is there's way too much padding.
It really is very repetitive. If it were half as thick and costs half
as much, it'd be a great book.
--Yu
Wahler, you're being ridiculously stubborn.
http://groups.google.com/groups?threadm=3ECFA41C.A3B7A957%40web.de
(Subject: Upcoming ISO/IEC <thread>... and ...)
regards,
alexander.
Well actually C++ does not have any functionality to directly support
threads so that is left to the OS system calls. You can of course call
those same functions from C++ as you can from any other language that
has the threads support, but any discussion of that would be off topic
on this list. For a detailed discussion please look at the group
comp.programming.threads
I have not spent much time looking at BOOST but what I can suggest is to
look at the ACE project as they have platform independent C++ wrappers
around the many disparate thread libraries, and many design patterns
implemented, plus tutorials on how to use them.
http://www.cs.wustl.edu/~schmidt/ACE.html
Feel free to contact me off-line and I would be happy to field any of
your specific questions you might have on C++/threads.
Steve.