Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?
share|improve this question
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. –  birryree Mar 28 '12 at 15:27
2  
What is "the Unix Thread class" ? –  sdg Mar 28 '12 at 17:19
add comment

1 Answer

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.

share|improve this answer
    
+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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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