I'm looking for a good guide/tutorial on multithreading in C++ (and ideally in general). Can anyone point me to a good online resource?
EDIT: I intend to familiarize myself with either the boost threading library or the one from Poco.
I'm looking for a good guide/tutorial on multithreading in C++ (and ideally in general). Can anyone point me to a good online resource?
EDIT: I intend to familiarize myself with either the boost threading library or the one from Poco.
If you mean to parallelize computation for multi-core, check out OpenMP. It has gcc and intel (I'm not sure about Visual C++) support, and is a lot easier than using primitives.
The Dr. Dobbs article "The Boost.Threads Library" is a short introduction to the subject, using one of the Boost C++ Libraries.
Check out this useful video-lectures from Intel: http://software.intel.com/en-us/videos/three-things-you-must-teach-module-1-recognizing-potential-parallelism/
This tutorial covers:
The video tutorial is very short: about 60 minutes, so I hope you will find it useful.
That's not a tutorial, but a good set of articles Effective Concurrency by Herb Sutter.
If you're going to use boost::thread, I'd make sure to check out Anthony Williams' website, blogs and articles he maintains boost::thread contributed to the C++0x library particularly the threading components and the information he provides is accurate, relevant and concise.
He also has a book coming out this fall on modern C++ threading called Concurrency in Action.
Joe Duffy's book and blog is also a good resource.