I have two related questions:

  1. Are there any good books for multithreading in C++, especially now that C++11 contains multithreading in the standard library?

  2. I have the Wrox Programming on Unix book (1000 pages fat red one) and within it, it uses the Unix Thread class.

    • How does this code relate to boost and the C++11 multithreading libraries?
    • Is it better/worse/just specific to Unix etc?
    • Is the performance the same?
  • 1
    The only book I know that covers C++11's threading/concurrency mechanisms so far is C++ Concurrency in Action, which was just released a month ago. – wkl Mar 28 '12 at 15:27
  • 2
    What is "the Unix Thread class" ? – sdg Mar 28 '12 at 17:19

That's quite a question!

Threading is an OS task and traditionally people used pthreads on Unix and Windows Gui threads on Windows.
Boost::threads basically wraps these operating system services. How the compiler and OS maker implement c++11 threads is upto them, but generally you would not expect a huge performance difference between any of them.

If performance really matters then you probably need to get much finer grained than any of the general thread libraries and look at openMP, Intel TBB or OpenCL.

  • +1 Good answer, I would just add some links to openMP, Intel TBB and OpenCL. You are all over the place @Martin. – karlphillip Mar 28 '12 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.