<p>With the rise of multicore CPUs on the desktop, multithreading skills will become a valuable asset for programmers. Can you recommend some good resources (books, tutorials, websites, etc.) for a programmer who is looking to learn about threaded programming?</p>

[{'answer_id': 2491, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>I\'ve honestly never read it myself, but <a href="https://rads.stackoverflow.com/amzn/click/com/0201310090" rel="noreferrer" rel="nofollow noreferrer">Concurrent Programming in Java</a> is a book I\'ve heard recommended by several people.</p>\n'}, {'answer_id': 2496, 'author': 'Tarks', 'author_id': 398, 'author_profile': 'https://Stackoverflow.com/users/398', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://www.cilk.com/multicore-e-book/" rel="nofollow noreferrer">http://www.cilk.com/multicore-e-book/</a></p>\n\n<p>That\'s a nice general overview of the sitution, if you\'re looking for tuorials and books it might be best to specify a language as a starting point so you can mess around with some code.</p>\n'}, {'answer_id': 2513, 'author': 'graham.reeds', 'author_id': 342, 'author_profile': 'https://Stackoverflow.com/users/342', 'pm_score': 5, 'selected': True, 'text': '<p>Take a look at Herb Sutter\'s "<a href="http://www.gotw.ca/publications/concurrency-ddj.htm" rel="noreferrer">The Free Lunch Is Over</a>" and then his series of articles on <a href="http://herbsutter.wordpress.com/2008/07/31/effective-concurrency-the-many-faces-of-deadlock/" rel="noreferrer">Effective Concurrency</a>.</p>\n'}, {'answer_id': 10062, 'author': 'Kristopher Johnson', 'author_id': 1175, 'author_profile': 'https://Stackoverflow.com/users/1175', 'pm_score': 1, 'selected': False, 'text': '<p>The Erlang programming language provides an easy-to-use style of concurrent programming.  You may never actually use Erlang, but the concepts are transportable to other languages.  You might want to read the book <em>Programming Erlang: Software for a Concurrent World</em> .</p>\n\n<p>Fans of functional programming claim that there is no need to learn anything new.  Just use a pure functional language, and the compiler or interpreter will automatically parallelize everything.  So you might want to learn Haskell, OCaml, or another functional language.</p>\n'}, {'answer_id': 15278, 'author': 'dmo', 'author_id': 1807, 'author_profile': 'https://Stackoverflow.com/users/1807', 'pm_score': 3, 'selected': False, 'text': '<p>Joseph Albahari wrote a good overview of Threading in C# here:</p>\n\n<p><a href="http://www.albahari.com/threading/" rel="noreferrer">http://www.albahari.com/threading/</a></p>\n'}, {'answer_id': 19638, 'author': 'Lehane', 'author_id': 142, 'author_profile': 'https://Stackoverflow.com/users/142', 'pm_score': 2, 'selected': False, 'text': '<p>I\'ve read (most of) <a href="http://www.javaconcurrencyinpractice.com/" rel="nofollow noreferrer">Java Concurrency in Practice</a> by Brian Goetz, which is very good. </p>\n\n<p>There is obviously a Java-based theme running through the book (using Java specific implementations of threads, locks etc.), but pretty much all of the principles can be applied to other languages. </p>\n\n<p>The author\'s home page contains a <a href="http://www.briangoetz.com/pubs.html" rel="nofollow noreferrer">list of articles</a> he has written, some of which include threading related stuff. Maybe start there and if you like his style, buy the book.</p>\n'}, {'answer_id': 19688, 'author': 'Markus Olsson', 'author_id': 2114, 'author_profile': 'https://Stackoverflow.com/users/2114', 'pm_score': 2, 'selected': False, 'text': '<p>For a great guide and reference for concurrency programming in C# (or .NET in general) I\'d recommend the MSDN <a href="http://msdn.microsoft.com/msdnmag/issues/05/08/Concurrency/default.aspx" rel="nofollow noreferrer">What Every Dev Must Know About Multithreaded Apps</a> article by Vance Morrison on MSDN. It contains a great deal of best-practice information and caveats about multithread development</p>\n'}, {'answer_id': 19694, 'author': 'ollifant', 'author_id': 2078, 'author_profile': 'https://Stackoverflow.com/users/2078', 'pm_score': 1, 'selected': False, 'text': '<p>I don\'t know what exactly you are looking for, but if you are doing WindowsForms development the following blog post is worth every minute reading:\n<a href="http://weblogs.asp.net/justin_rogers/articles/126345.aspx" rel="nofollow noreferrer">WinForms UI Thread Invokes: An In-Depth Review of Invoke/BeginInvoke/InvokeRequred</a></p>\n'}, {'answer_id': 21146, 'author': 'Jeff Linahan', 'author_id': 2222, 'author_profile': 'https://Stackoverflow.com/users/2222', 'pm_score': 1, 'selected': False, 'text': '<p>I think Boost.Threads is a great C++ concurrency library to learn, especially if you just want to get started in writing multithreaded applications.  The code is very succinct and easy to understand, plus the next C++ standard will likely include a threading library based on Boost.Threads  (tutorial: <a href="http://www.ddj.com/cpp/184401518" rel="nofollow noreferrer">http://www.ddj.com/cpp/184401518</a>)</p>\n'}, {'answer_id': 29957, 'author': 'Hamish Downer', 'author_id': 3189, 'author_profile': 'https://Stackoverflow.com/users/3189', 'pm_score': 1, 'selected': False, 'text': '<p>If you want to have a go at doing a highly parallel version of a simple task, or see real solutions, you could do worse than look at the <a href="http://www.tbray.org/ongoing/When/200x/2007/09/20/Wide-Finder" rel="nofollow noreferrer">wide finder</a> project.  Basically it\'s about how to do parallel regex matching of log files efficiently, but trying to add as little code as possible.  </p>\n\n<p>Participants have submitted solutions in many different languages and the <a href="http://www.tbray.org/ongoing/When/200x/2007/10/30/WF-Results" rel="nofollow noreferrer">performance results</a> are posted.  The original project has now finished and there is now <a href="http://www.tbray.org/ongoing/When/200x/2008/05/01/Wide-Finder-2" rel="nofollow noreferrer">wide finder 2</a> taking the work on.</p>\n\n<p><a href="http://www.codinghorror.com/" rel="nofollow noreferrer">CodingHorror</a> has a good <a href="http://www.codinghorror.com/blog/archives/001131.html" rel="nofollow noreferrer">introduction to wide finder</a>.</p>\n'}, {'answer_id': 29970, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p><a href="http://www.yoda.arachsys.com/csharp/threads/" rel="nofollow noreferrer">http://www.yoda.arachsys.com/csharp/threads/</a></p>\n'}, {'answer_id': 53400, 'author': 'eLuke', 'author_id': 5499, 'author_profile': 'https://Stackoverflow.com/users/5499', 'pm_score': 1, 'selected': False, 'text': '<p>For a rich, thorough treatment of the subject, with a good balance between computer science and practice, I recommend <a href="https://rads.stackoverflow.com/amzn/click/com/0123705916" rel="nofollow noreferrer" rel="nofollow noreferrer">The Art of Multiprocessor Programming</a>. A lot of examples are in object-oriented code, i.e. Java, with other languages scattered throughout. It just depends on the topic being covered. What I really love about this book is that it discusses how common algorithms should be implemented in a concurrent design. Of course, there\'s so much more!</p>\n\n<p>For general concepts and a treatment of pthreads, I really like <a href="https://rads.stackoverflow.com/amzn/click/com/0201633922" rel="nofollow noreferrer" rel="nofollow noreferrer">Programming with POSIX Threads</a>. Being the library and API that it is, it\'s in C.</p>\n\n<p>For Windows and C# developers, check out <a href="http://www.bluebytesoftware.com/blog/" rel="nofollow noreferrer">Joe Duffy\'s blog</a>. Joe works on parallel libraries, infrastructure, and programming models in Microsoft\'s Developer Division. He has a book coming in Nov. 2008 titled <a href="http://www.bluebytesoftware.com/books/winconc/winconc_book_resources.html" rel="nofollow noreferrer">Concurrent Programming on Windows</a> (<a href="https://rads.stackoverflow.com/amzn/click/com/032143482X" rel="nofollow noreferrer" rel="nofollow noreferrer">Amazon link</a>).</p>\n\n<p>Also, don\'t miss the Godfather\'s blog: Herb Sutter\'s <a href="http://herbsutter.wordpress.com/" rel="nofollow noreferrer">Sutter\'s Mill</a>. He has links to all his articles in Dr. Dobb\'s Journal and more. Click his <a href="http://herbsutter.wordpress.com/category/concurrency/" rel="nofollow noreferrer">Concurrency category</a>.</p>\n'}, {'answer_id': 112880, 'author': 'Alex Miller', 'author_id': 7671, 'author_profile': 'https://Stackoverflow.com/users/7671', 'pm_score': 2, 'selected': False, 'text': '<p>I maintain a linkblog for concurrency articles, blogs, and projects at:</p>\n\n<p><a href="http://concurrency.tumblr.com" rel="nofollow noreferrer">http://concurrency.tumblr.com</a></p>\n\n<p>I usually post a link or two per day on a variety of topics (threads, actors, locking, parallel programming) in a variety of environments (Erlang, Java, Scala, .NET, C++, Ruby, Python, etc).  </p>\n'}, {'answer_id': 139074, 'author': 'user21082', 'author_id': 21082, 'author_profile': 'https://Stackoverflow.com/users/21082', 'pm_score': 1, 'selected': False, 'text': '<p>CPU manufacturers websites have some interesting content:</p>\n\n<p><a href="http://developer.amd.com/documentation/articles/Pages/default.aspx#parallel" rel="nofollow noreferrer">http://developer.amd.com/documentation/articles/Pages/default.aspx#parallel</a></p>\n\n<p><a href="http://software.intel.com/en-us/multi-core" rel="nofollow noreferrer">http://software.intel.com/en-us/multi-core</a></p>\n\n<p>Also Intel\'s opensource threading library has some good references:</p>\n\n<p><a href="http://www.threadingbuildingblocks.org/" rel="nofollow noreferrer">http://www.threadingbuildingblocks.org/</a></p>\n'}, {'answer_id': 158595, 'author': 'Steve', 'author_id': 22712, 'author_profile': 'https://Stackoverflow.com/users/22712', 'pm_score': 2, 'selected': False, 'text': '<p>It\'s Delphi specific, but no reason why the concept wouldn\'t apply to any other language!</p>\n\n<p><a href="http://www.eonclash.com/Tutorials/Multithreading/MartinHarvey1.1/ToC.html" rel="nofollow noreferrer">Multi Threading Tutorial</a></p>\n'}, {'answer_id': 187133, 'author': 'Anthony Williams', 'author_id': 5597, 'author_profile': 'https://Stackoverflow.com/users/5597', 'pm_score': 3, 'selected': False, 'text': '<p>I write about multithreading and concurrency in C++ on <a href="http://www.justsoftwaresolutions.co.uk/blog/" rel="noreferrer">my blog</a>. I\'m also writing a book on concurrency in C++: <a href="http://www.manning.com/williams/" rel="noreferrer">C++ Concurrency in Action</a>.</p>\n'}, {'answer_id': 514327, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>If you work with C#, the book "C# 2008 and 2005 threaded programming", by Gaston C. Hillar - Packt Publishing - <a href="http://www.packtpub.com/beginners-guide-for-C-sharp-2008-and-2005-threaded-programming/book" rel="nofollow noreferrer">http://www.packtpub.com/beginners-guide-for-C-sharp-2008-and-2005-threaded-programming/book</a> ,  will help you.\nHighly recommended for C# programmers, because you can download the code with funny examples that exploit your multicore computer.\nThe book is a nice guide with a lot of code to practice. It tells stories while it explains the most difficult concepts.</p>\n'}]
['https://Stackoverflow.com/questions/2482', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/311/']