Book Cover - Book Review: Java Concurrency in Practice

Does anyone ever try to write concurrent code and looks their code does weird things in production, at the worst possible time, under heavy load? With Java Concurrency in Practice, this time is over, at least for us, the fortunate readers of this exceptional book.

When Java Concurrency in Practice was published, multicore processors was just becoming inexpensive enough for desktop systems. Today, multicore processors are present everywhere, even in our smartphones. So, we have no choice but learn the principles of concurrent programming.

The authors are uniquely qualified to write about the topic. Brian Goetz and all the authors are the primary members of the JCP Expert Group that created these facilities. Moreover, the authors do an excellent job of explaining in a clear manner a subject considered as a subject for advanced users only. With this book, novice programmers on the subject (like me) will be confident in writing concurrent code.

To give you a glimpse of the content:

  • Part I: Fundamentals. You will learn the basic concepts: thread safely, immutability, safe publication, and the creation of thread-safe class by composing existing thread-safe building blocks.
  • Part II: Structuring Concurrent Applications. You will learn how concurrency improves the throughput and responsiveness of your applications by executing and scheduling tasks concurrently.
  • Part III: Liveness, Performance, and Testing. You will learn how to ensure that concurrent programs do what their are expected to do with acceptable performance.
  • Part IV: Advanced Topics. The most experienced readers will learn more about atomic variables, non blocking algorithms and creating their own synchronizers.

What I love the most about this book is the numerous examples of “bad” code and how the authors rework them to do what they are initially supposed to do. Learning is so much easier that way. Moreover, no prior concurrent programming experience is required.

Finally, Java Concurrency in Practice is well written, probably one of the best technical book ever published. Too often, technical books confused the readers as soon the difficulty rises. This book is an exception, being enjoyable to read and always clear and to the point.

A very important book. Everyone should (re-)read it.

About the author

Julien Sobczak works as a software developer for Scaleway, a French cloud provider. He is a passionate reader who likes to see the world differently to measure the extent of his ignorance. His main areas of interest are productivity (doing less and better), human potential, and everything that contributes in being a better person (including a better dad and a better developer).

Read Full Profile