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

V

Victor Bazarov

QQ said:
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
 
P

Phlip

QQ said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top