Chapter 3. Traditional Building Blocks of Concurrency

 

"There's an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone."

 
 --Bjarne Stroustrup

The concurrency primitives shown in Chapter 2, Concurrency on the JVM and the Java Memory Model, are the basics of concurrent programming on JVM. Nevertheless, we usually avoid using them directly, as their low-level nature makes them delicate and prone to errors. As we saw, low-level concurrency is susceptible to effects such as data races, reordering, visibility, deadlocks, and non-determinism. Fortunately, people have come up with more advanced building blocks of concurrency, that capture common ...

Get Learning Concurrent Programming in Scala - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.