
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Concurrent Programming on Windows 1st Edition
Purchase options and add-ons
“When you begin using multi-threading throughout an application, the importance of clean architecture and design is critical. . . . This places an emphasis on understanding not only the platform’s capabilities but also emerging best practices. Joe does a great job interspersing best practices alongside theory throughout his book.”
– From the Foreword by Craig Mundie, Chief Research and Strategy Officer, Microsoft Corporation
Author Joe Duffy has risen to the challenge of explaining how to write software that takes full advantage of concurrency and hardware parallelism. In Concurrent Programming on Windows, he explains how to design, implement, and maintain large-scale concurrent programs, primarily using C# and C++ for Windows.
Duffy aims to give application, system, and library developers the tools and techniques needed to write efficient, safe code for multicore processors. This is important not only for the kinds of problems where concurrency is inherent and easily exploitable―such as server applications, compute-intensive image manipulation, financial analysis, simulations, and AI algorithms―but also for problems that can be speeded up using parallelism but require more effort―such as math libraries, sort routines, report generation, XML manipulation, and stream processing algorithms.
Concurrent Programming on Windows has four major sections: The first introduces concurrency at a high level, followed by a section that focuses on the fundamental platform features, inner workings, and API details. Next, there is a section that describes common patterns, best practices, algorithms, and data structures that emerge while writing concurrent software. The final section covers many of the common system-wide architectural and process concerns of concurrent programming.
This is the only book you’ll need in order to learn the best practices and common patterns for programming with concurrency on Windows and .NET.
- ISBN-10032143482X
- ISBN-13978-0321434821
- Edition1st
- PublisherAddison-Wesley Professional
- Publication dateOctober 28, 2008
- LanguageEnglish
- Dimensions7 x 2.1 x 9.2 inches
- Print length1008 pages
Customers who bought this item also bought
Editorial Reviews
Review
“I have been fascinated with concurrency ever since I added threading support to the Common Language Runtime a decade ago. That’s also where I met Joe, who is a world expert on this topic. These days, concurrency is a first-order concern for practically all developers. Thank goodness for Joe’s book. It is a tour de force and I shall rely on it for many years to come.”
―Chris Brumme, Distinguished Engineer, Microsoft
“I first met Joe when we were both working with the Microsoft CLR team. At that time, we had several discussions about threading and it was apparent that he was as passionate about this subject as I was. Later, Joe transitioned to Microsoft’s Parallel Computing Platform team where a lot of his good ideas about threading could come to fruition. Most threading and concurrency books that I have come across contain information that is incorrect and explains how to solve contrived problems that good architecture would never get you into in the first place. Joe’s book is one of the very few books that I respect on the matter, and this respect comes from knowing Joe’s knowledge, experience, and his ability to explain concepts.”
―Jeffrey Richter, Wintellect
“There are few areas in computing that are as important, or shrouded in mystery, as concurrency. It’s not simple, and Duffy doesn’t claim to make it so―but armed with the right information and excellent advice, creating correct and highly scalable systems is at least possible. Every self-respecting Windows developer should read this book.”
―Jonathan Skeet, Software Engineer, Clearswift
“What I love about this book is that it is both comprehensive in its coverage of concurrency on the Windows platform, as well as very practical in its presentation of techniques immediately applicable to real-world software development. Joe’s book is a ‘must have’ resource for anyone building native or managed code Windows applications that leverage concurrency!”
―Steve Teixeira, Product Unit Manager, Parallel Computing Platform, Microsoft Corporation
“This book is a fabulous compendium of both theoretical knowledge and practical guidance on writing effective concurrent applications. Joe Duffy is not only a preeminent expert in the art of developing parallel applications for Windows, he’s also a true student of the art of writing. For this book, he has combined those two skill sets to create what deserves and is destined to be a long-standing classic in developers’ hands everywhere.”
―Stephen Toub, Program Manager Lead, Parallel Computing Platform, Microsoft
“As chip designers run out of ways to make the individual chip faster, they have moved towards adding parallel compute capacity instead. Consumer PCs with multiple cores are now commonplace. We are at an inflection point where improved performance will no longer come from faster chips but rather from our ability as software developers to exploit concurrency. Understanding the concepts of concurrent programming and how to write concurrent code has therefore become a crucial part of writing successful software. With Concurrent Programming on Windows, Joe Duffy has done a great job explaining concurrent concepts from the fundamentals through advanced techniques. The detailed descriptions of algorithms and their interaction with the underlying hardware turn a complicated subject into something very approachable. This book is the perfect companion to have at your side while writing concurrent software for Windows.”
―Jason Zander, General Manager, Visual Studio, Microsoft
From the Back Cover
“When you begin using multi-threading throughout an application, the importance of clean architecture and design is critical. . . . This places an emphasis on understanding not only the platform’s capabilities but also emerging best practices. Joe does a great job interspersing best practices alongside theory throughout his book.”
– From the Foreword by Craig Mundie, Chief Research and Strategy Officer, Microsoft Corporation
Author Joe Duffy has risen to the challenge of explaining how to write software that takes full advantage of concurrency and hardware parallelism. In Concurrent Programming on Windows, he explains how to design, implement, and maintain large-scale concurrent programs, primarily using C# and C++ for Windows.
Duffy aims to give application, system, and library developers the tools and techniques needed to write efficient, safe code for multicore processors. This is important not only for the kinds of problems where concurrency is inherent and easily exploitable―such as server applications, compute-intensive image manipulation, financial analysis, simulations, and AI algorithms―but also for problems that can be speeded up using parallelism but require more effort―such as math libraries, sort routines, report generation, XML manipulation, and stream processing algorithms.
Concurrent Programming on Windows has four major sections: The first introduces concurrency at a high level, followed by a section that focuses on the fundamental platform features, inner workings, and API details. Next, there is a section that describes common patterns, best practices, algorithms, and data structures that emerge while writing concurrent software. The final section covers many of the common system-wide architectural and process concerns of concurrent programming.
This is the only book you’ll need in order to learn the best practices and common patterns for programming with concurrency on Windows and .NET.
About the Author
Joe Duffy is the development lead, architect, and founder of the Parallel Extensions to the .NET Framework team at Microsoft. In addition to hacking code and managing a team of developers, he works on long-term vision and incubation efforts, such as language and type system support for concurrency safety. He previously worked on the Common Language Runtime team. Joe blogs regularly at www.bluebytesoftware.com/blog.
Product details
- Publisher : Addison-Wesley Professional
- Publication date : October 28, 2008
- Edition : 1st
- Language : English
- Print length : 1008 pages
- ISBN-10 : 032143482X
- ISBN-13 : 978-0321434821
- Item Weight : 3.4 pounds
- Dimensions : 7 x 2.1 x 9.2 inches
- Best Sellers Rank: #3,917,247 in Books (See Top 100 in Books)
- #211 in Parallel Computer Programming
- #423 in Microsoft .NET
- #796 in Microsoft OS Guides
- Customer Reviews:
About the author

Joe Duffy is a Program Manager on the Common Language Runtime (CLR) Team at Microsoft, where he works on concurrency and parallel programming models. Prior to joining the team, he was an independent consultant, a CTO for a startup ISV, and an Architect and Software Developer at Massachusetts-based EMC Corporation. Joe has worked professionally with native Windows (COM and Win32), Java, and the .NET Framework, and holds research interests in parallel computing, transactions, language design, and virtual machine design and implementation. He lives in Washington with his soon-to-be wife, cat, and two crazy ferrets. Joe writes frequent essays on his blog at http://www.bluebytesoftware.com/.
Customer reviews
- 5 star4 star3 star2 star1 star5 star72%18%10%0%0%72%
- 5 star4 star3 star2 star1 star4 star72%18%10%0%0%18%
- 5 star4 star3 star2 star1 star3 star72%18%10%0%0%10%
- 5 star4 star3 star2 star1 star2 star72%18%10%0%0%0%
- 5 star4 star3 star2 star1 star1 star72%18%10%0%0%0%
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on November 5, 2017Format: PaperbackVerified PurchaseIf you take a brief trip over to Joe's blog at joeduffyblog.com, or find just about any talk that he's given, you'll quickly find that he has a deep knowledge about a broad range of topics, including safe systems programming, compilers, type systems, programming languages (he talks a lot about Haskell, Rust, Go, C#, and others), and many other topics. Of all the books that I've purchased over the years, I believe Joe may be the most qualified for the topic.
Joe takes the reader through all sorts of things in this book, from basic synchronization algorithms (and why we need them), formally defining threads, Windows and .NET APIs, synchronization primitives, memory models, and so much more. I haven't quite finished this book yet, but have am on the last chapter (then there are two appendices). Not all of the code samples work if you try to run them, however, the minor typos that exist in the code and the text are easy enough to overcome.
I came at this book knowing the basics of programming in C#, but not really knowing a whole lot about concurrency issues. While I don't even pretend to be an expert at this now, I do at least feel comfortable analyzing code and making decisions about what to do for various problems, and also feel that I can at least have an intelligent conversation about the topics covered in this book. This book has also helped me cultivate a much deeper understanding of how a bunch of things in Windows, the CLR, and the .NET Framework work (beyond just concurrency issues).
This book is pretty hefty. I'm not even finished and I'm over 800 pages in, and I would say that at least 85% of the topics in this book have helped me in my job. I would recommend this book to just about anyone that's starting out. The only thing I can say is as you start to get comfortable with the things Joe discusses, take a break to go read Appendix A, where he talks about ways that the lay person should and should not apply the knowledge in this book.
This book does not deal with the Task Parallel Library very much, as it wasn't released when Joe wrote the book. If you're looking for a book on modern .NET Concurrency, I would recommend Stephen Cleary's Concurrency in C# Cookbook (forwarded by Stephen Toub; Stephen has a website you can read to preview some of his writing). With that said, this book deals with a lot of interesting, low-level details. It's definitely a good read for the curious, or for anyone contributing to a legacy .NET codebase.
- Reviewed in the United States on July 23, 2012Format: PaperbackVerified PurchaseIf you are looking to write a Hello World, this is not your book. If you are designing, developing, or troubleshooting a concurrent production worthy software then fasten your seat belts as this is your book. I am not a .NET programmer which made this book perfect for me.
- Reviewed in the United States on March 4, 2009Format: PaperbackI'll split my review into 3 parts:
Know what you get (book's goals): 4/10. The book is a bit "all over the place". It's hard to understand the intent of the book -- it's a bit too theoretical for a "pragmatic concurrent development" that it claims to be which makes the entire book a bit fuzzy and way too long. The problem with this kind of books that you usually can't read all (reading 800+ pages is too much for most people) and you're afraid of missing important parts.
Coverage: 9/10. This book is a great "ref" book in my bookshelf, it explains high level architecture to very deep bits&bytes usage in a very readable fashion. I've got a list of pages that I recommended every one of our developers to read, starting from basic things and dive into data structures, interesting pitfalls and solutions and specific tips & tricks that I found very interesting during my reading.
Relevance: 10/10. This is a must have book for windows developers (especially for .Net developers). It contains crucial basics with an amazing list of examples and best practices (need to be pulled out carefully, but it's there).
I'm still missing a well organized "common concurrent pitfalls & solutions" chapter for the pragmatic developers (assuming that the background exists).
All in all, I highly recommend this book! nice work!
- Reviewed in the United States on November 25, 2011Format: PaperbackVerified PurchaseThis is a book every serious dev should read. I don't know about an alternative.
However, why did the publisher not correct the hundreds of errors found in the 2nd printing, now that the 4th printing is out?
=> read the errata before studying the book!
highly recommended.
- Reviewed in the United States on December 17, 2016Format: PaperbackVerified PurchaseBest book written for multi threaded programing it is the goto reference...period
- Reviewed in the United States on April 24, 2009Format: Paperbackgood material for beginner and advanced threaded developer. concepts are easy to test compared to other materials on same concept.
- Reviewed in the United States on February 10, 2009Format: PaperbackVerified PurchaseNo need for any other book about concurrent programming on .net. This book have everything you need to become a master in multi-thread programming on Microsoft .net framework. A must have!
- Reviewed in the United States on May 30, 2015Format: PaperbackI have actually done this type of work on Windows for 22 years. While I understand that there are simpler methods for doing this type of work since the release of .NET 4.0, I have read and reread Joe Duffy's absolutely definitive reference on this topic many times.
The book is not for beginner developers, nor frankly for intermediate developers. If, however, you regard yourself as a professional computer scientist writing the most exacting server applications for Windows, this book is so far better than any other that there is no basis for comparison with another.
I rewrote the main set of Windows-to-mainframe integration libraries used by thousands of banks using this as a reference and doubled the speed and scalability of the libraries. I also wrote an application that completely replicated the functionality of a popular performance testing software suite with these techniques. Many thanks to Joe Duffy.
Top reviews from other countries
- Heavens MilienReviewed in Canada on May 17, 2009
4.0 out of 5 stars good book
Format: PaperbackVerified Purchasethe information is valuable and the global book's structure is very efficient.However, the written style is not the best as i' ve seen .
- M. KaluzaReviewed in the United Kingdom on August 7, 2009
5.0 out of 5 stars A very thorough reference
Format: PaperbackVerified PurchaseThis book is extremely thorough reference detailing minute details of concurrent programming on Windows. Author not only discusses high level .NET mechanisms but also underlying OS/kernel primitives.
Frequent references to C/C++ or even assembler may make it difficult to .NET only developers. As it is packed with rather in depth information it is not an easy read, so if you are looking for a quick "how to" guide this book may not be ideal.
I highly recommended it if you want to dive deeper than what's available in .NET framework library. If you read it it's going to be probably the last book on the subject that you will ever have to read.
- M. ClarkeReviewed in the United Kingdom on June 3, 2009
4.0 out of 5 stars The most in-depth book on Windows you will ever read
Format: PaperbackVerified PurchaseThere are a couple of things it is worth knowing about this book before you buy it. Firstly although it is in the .Net development series it is of far more use to those working in the unmanaged world, the second is that it is over 1000 pages in length and is not a reference book as much as a technical journey of discovery. You will need to read this cover to cover to get much out of it.
Although split into 4 sections you can really think of this as 2 books, sections 1 and 2 are a guide to threading on Windows, sections 3 and 4 cover concurrent programming techniques.
Even if you have been programming on Windows for years and consider yourself au-fait with threading you will be amazed at the breadth and depth of information in the guide to threading. There is low level detail on everything from thread local storage to thread pools (both managed and unmanaged) and a lot of coverage of additional kernal level functions available only to unmanaged developers working in Vista or Server 2008.
The book covers ways to utilise multiple CPU's, ways to measure utilisation and low level knowledge that one can apply to write perfomant code, having used many of the techniques myself they do work and it is eye opening quite how much faster you can make many sever operations. Maybe the most eye opening element is details on the re-ordering that compilers do, especially on 64bit processors, there is discussion of use of memory barriers to force operation ordering.
By now I am sure you get the impression, this is low level stuff, very useful to those working on c++ server code, possibly less applicable to most .Net developers.
The real flaw with the guide to threading section is that there is no adequate index or contents section and that each chapter does not contain a summary of what is covered, this makes using the book as a reference unnecessarily time consuming.
The concurrent programming techniques, section 3 and 4 and appendices, is a bit hit and miss in my opinion, there is a fine discussion of liveness hazards (deadlocks and livelock etc.) and low lock code, but some of the stuff on data / task parallelism seems a little simplistic for a book at this level. The last section on GUI development basically be summarised as don't do too much work on the GUI thread, which if you have got this far in the book I think you would know.
Although the concurrent programming techniques section is more applied than the first half of the book don't expect to lift many code samples from it, it's really not that kind of book.
To summarise, if you want to know the low level details of threading / parallelism on windows and you have a lot of time to read one then this is the book for you. If you want a multi-threading cookbook best look elsewhere.
- V. KoulReviewed in the United Kingdom on March 8, 2011
4.0 out of 5 stars Great book, Must have for Windows Programmers
Format: PaperbackVerified PurchaseThis book collects wealth of information about different topics from different sources and provide that to its readers in a very structured manner...