2

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?
Nasreddine
  • 243
  • 2
  • 9
Roger
  • 137
  • 5
  • 1
    The only book I know that covers C++11's threading/concurrency mechanisms so far is [C++ Concurrency in Action](http://www.manning.com/williams/), 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

1 Answers1

7

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.

Martin Beckett
  • 15,776
  • 3
  • 42
  • 69
  • +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