O'Reilly logo

Seven Concurrency Models in Seven Weeks by Paul Butcher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wrap-Up

Threads-and-locks programming probably divides opinion more than any of the other techniques we’ll cover. It has a reputation for being fiendishly difficult to get right, and plenty of programmers shrink from it, avoiding multithreaded programming at all costs. Others don’t understand the fuss—a few simple rules need to be followed, and if you follow them it’s no harder than any other form of programming.

Let’s look at its strengths and weaknesses.

Strengths

The primary strength of threads and locks is the model’s broad applicability. As you might expect, given that they’re the basis upon which many of the approaches we’ll cover later are built, they can be applied to a very wide range of problems. Because they are “close to the metal”—little ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required