Concurrency: Programmer’s Guide

Upgrade to the modern JDK concurrency API as the first step to programming concurrency. Reduce the use of the old multithreading API that shipped with the first versions of Java. The java.util.concurrent API is such a breath of fresh air. We can easily manage a pool of threads, have better control over synchronization, and also benefit from high-performing concurrent data structures, as we saw in Chapter 4, Scalability and Thread Safety. Several libraries now make use of this modern API, and concurrency libraries (such as Akka and GPars) provide a layer of abstraction on top of this modern API.

If your job responsibilities include “mutable state wrangler,” you know the frustrations of ensuring thread-safety ...

Get Programming Concurrency on the JVM 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.