Go to content Go to navigation Go to search

Book: Concurrent Programming on Windows

Posted in , Nov 2, 08:51 PM

There are a lot of Windows books that touch on concurrency and they might be enough to get started. Concurrent Programming on Windows is different; it’s huge and should be thought of as an encyclopaedia of .net and Win32 concurrency.

If you’re a Windows developer involved in writing remotely demanding code then you should read this. It provides a coherent conceptual framework for how all the concurrency pieces go together. The samples while indicated as not production ready, are significantly faster and safer than easily available ones on the Internet or what your average developer will write.

The book does have some downsides. Given the comprehensive nature then you won’t need it all at any given time. It covers both Win32 and .net so developers that only deal with one of the other may want to skip sections. The focus is heavily on small examples so it won’t tell you all you’ll need when you scale up the techniques for applications but you will get building blocks.

Highly recommended for Windows developers. Most machines sold now are multi-core and we owe it to our users to learn to build the natural and useable experiences this hardware allows.

Joe Duffy’s weblog contains a lot of similar material.

“Recursive lock acquires are redundant and add unnecessary performance overhead. But worse, depending on recursion can make it
more dif?cult to understand the synchronization behavior of your
program, in particular at what boundaries invariants are supposed
to hold. Usually we’d like to say that the ?rst line after a lock acquisition represents an invariant “safe point” for an object, but as soon
as recursion is introduced this statement can no longer be made con?dently.”