By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,881 Members | 1,427 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,881 IT Pros & Developers. It's quick & easy.

Is there any good introduction books on C++multithread programming

P: n/a
QQ
I am new here and got lost on a multithread C++ system
source codes

Thanks a lot!

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
QQ wrote:
I am new here and got lost on a multithread C++ system
source codes


You should ask in comp.programming.threads. C++ does not
have any mechanisms for multithreading, it's all part of the
platform/OS you're on.

V
Jul 23 '05 #2

P: n/a
QQ wrote:
I am new here and got lost on a multithread C++ system
source codes


Are you reading that source to learn? Are you on the job and must change it?
Or are you writing a new program with threads?

From the top: C++ does not define any Standard thread functions. Every
implementation of C++ is different, and exposes various different OS
threading facilities. To learn from existing source, or change it, you must
research only the specific threading library (ZThread?) involved. They are
all different, and a generic introductory book might not cover your library.

If you are writing a new program, don't thread. Always start with a fully
event-driven design, so you won't need threading for as long as possible.
Make sure all your long processes are interruptible. Don't write a loop
statement if you can store its index in a data member and loop from driver
code.

Premature threading can lead to a bad design - and simply horrible bugs as
the threads conflict over resoures. An event driven design, however,
typically forces your program to use a clean and healthy object model. This
makes threads easy and safe to retrofit if you then find a real reason for
them.

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand
Jul 23 '05 #3

P: n/a
Phlip wrote:
If you are writing a new program, don't thread. Always start with a fully
event-driven design, so you won't need threading for as long as possible.

Actually having hit the clock speed enhancement wall and getting multicore processors, we
must thread as much as possible.
http://www.gotw.ca/publications/concurrency-ddj.htm
--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.