6 Best Multithreading and Concurrency books for Java Programmers

Published in
9 min read Aug 1, 2020

--

Hello guys, you may know that books are essential to learning something new, and despite being in the electronic age, where books have lost some shine to the internet and blogs, I still read and recommend them to get complete and authoritative knowledge on any topic, like concurrent programming.

Concurrency is a difficult topic to master but at the same time very important and that’s why books play an important role. Earlier, I have shared the best Java Concurrency Courses and in this article, I will share the six best books to learn multithreading and concurrency in Java. You can combine them with those courses to learn Multithreading and concurrency in depth.

These books cover basics, starting from how to create and start a thread, parallel programming, concurrency design patterns, an advantage of concurrency, and of course pitfalls, issues, and problems introduced due to multithreading.

Learning concurrent programming is a difficult task, not even in Java but also in other languages like C++ or modern days JVM languages like Groovy, Scala, Kotlin, Closure, and JRuby.

Since I have been doing active Java development for more than 10 years, I can say that this is the best language to start with concurrent programming, because of its structure, inbuilt concurrency support in terms of synchronized, volatile, and final keyword, and finally because of a wealth of information available in internet and community.

Anyway, there is no substitute for writing code and learning from a mistake, but you need a book that can guide, educate and teach you, what others have already learned in threads, concurrency, and parallel programming.

Btw, a good knowledge of fundamental concepts in Java is required before you go deep in multithreading and concurrency. If you are new to the Java world, I suggest you first go through The Complete Java MasterClass course on Udemy to learn the basics, and then reading these books would make more sense.

6 Best books on Java Multithreading and Concurrency which are worth reading

Here is my list of books to master thread basics, multi-threading gotchas, and principles and patterns of concurrent programming in Java. They will not only teach you what to do but also what not to do.

Since multi-threading is a tricky topic, it’s better to refer to more than one book because you will find you connect to some authors better than others.

1. The Art of Multiprocessor Programming

Ideally, this book should be the first book any programmer read on concurrent and multiprocessor programming, it covers academic stuff like classical producer-consumer and readers-writers problems, and explains some fundamentals of multiprocessors and shared memory.

The Art of Multiprocessor Programming Revised by Maurice Herlihy and Nir Shavit is also a must-read for any Java developer, who just know how to use a thread Java but not familiar with essential principles of concurrent programming, like critical section, mutual exclusion, locking, shared memory, memory barriers, and synchronization, etc. I must say you got to read this book to know its actual value, it is just amazing.

If you need a course to combine with this book, particularly on Concurrency and Performance optimization then I also suggest you check out The Java Multithreading, Concurrency, and Performance Optimization course by Michael Pogrebinsy on Udemy. One of the best courses to learn advanced concepts of multithreading and concurrency with a strong emphasis on high performance.

In short, a truly excellent book and a must-read for not just Java programmers but anyone who wants to learn the basics of concurrent programming, like C++, C#, Scala.

2. Java Thread 3rd edition

The first book I have read, particularly in Java multi-threading was the Java Thread 2nd edition by Scott Oaks and Henry Wong. The book is fantastic, and it teaches the basics of creating a thread and how to use them with some non-trivial yet straightforward examples.

They have one of the best chapters on teaching, how to use the wait and notify mechanism in Java. The only drawback of the 2nd edition was then it has not covered new concurrency classes like CountDownLatch, CyclicBarrier, or Semaphore introduced in Java 1.5.

The new, Java Thread 3rd edition fills that gap, and now it covers all those new concurrencies and synchronization utilities of J2SE 5.0. If you are a beginner and don’t know much about what is a thread, how do they help, and how to use them to create a multi-threaded application, this is the book, you should read.

If you want, you can also combine this with Applying Concurrency and Multi-threading to the Common Java Patterns course on Pluralsightto learn some real-world stuff as well.

Though this book focuses on Java programming language, it is also useful for learning the basics of threading, if you want to start with other JVM languages, like Scala.

3. Java Concurrency in Practice

Many hardcore fans of Java Concurrency in Practice will be furious by not keeping this book at the top of this list. Well, I have ordered the book from beginner programmers to advanced programmers, and this book certainly covers the advanced aspect of Java concurrency.

By the way, If you ask me to recommend just one book on concurrency and multi-threading to a Java programmer, I would recommend this one.

The Java Concurrency in Practice is the bible of concurrency and concurrent programming for Java developers and a must-read for anyone serious about parallel programming. There are a lot of good things about this book, starting from their icons for showing corrupt practices, and then improving them.

The only thing which concerns me is that the concepts themselves are not so easy so many times programmer finds it really difficult to read a book like this. If you also face the same problem, I suggest you join the Java Concurrency in Practice Bundle course by Dr Heinz M. Kabutz, a Java Champion and one of my favorite instructors.

He has created this course so that you can understand the concepts explained in the book more easily. It’s an areally good companion of the book and you would probably learn much more and in-depth if you combine the book with this course.

One of the highlights is their terminology, which is just crystal clear, very important when you are explaining a complex and confusing topic.

Another highlight is their author group, which includes Java concurrency expert Brian Goetz, Joshua Bloch who has written Effective Java and Java Collection API, Doug Lea, author of many classes in java.util. Concurrent package, like the ConcurrentHashMap, one of the most used concurrent collections in Java.

In one word, every Java developer must have a copy of Concurrency Practice in Java in their book self and smartphone for reading whenever they have some time.

4. Concurrent Programming in Java: Design Principles and Patterns

This book is another gem on concurrency and multi-threading from Doug Lea. This book is also meant for experienced and senior Java programmers, who know the basics of multithreading in Java and a bit of concurrency as well.

This book explains lots of design, patterns, and details about the inbuilt synchronization features of the Java programming language. Many of the patterns and design described in this book is used by Doug Lea while writing java.util.concurrent package.

These books can be best utilized by following examples and looking at concurrency code written by Doug Lea itself.

This book also covers the Java Memory Model, which is very important for any Java programmer. Though I suggest reading the Java Memory Model chapter from Java Concurrency in Practice for any beginners first because of its language, which is slightly easier to understand.

If you want, you can also combine this with the Efficient Java Multithreading and Concurrency with Executors course by Arun Kumar on Udemy to learn more about how to use Executors for better performance in Java.

5. Programming Concurrency on the JVM

This is a relatively new book in the field of concurrent programming, synchronization, and multi-threading.

This is written by one of my favorite authors, Venkat Subramanian, this book not only explains concepts in Java but also in other JVM programming languages, like Scala, Groovy, Closure, and JRuby.

The main highlight of this book is Software Transnational Model(STM) and Actor-based concurrency. This book explains new techniques of concurrent programming which allow you to compare and choose leading-edge stuff.

This books a lot of new things on a table which is I guess it’s the best selling point. If you want, you can also combine this book with Practical Java concurrency with the Akka Actor Model Udemy course to get the best from both worlds.

6. Mastering Concurrency Programming with Java 9

This is one of the rare books which covers Concurrency changes from the latest Java releases.

This book is for experienced Java developers who have a basic understanding of concurrency, but want to learn how to create modern concurrent Java applications or usage of streams for making processes more efficient is not required

Here are the main things you will learn in this book:

  1. How to use parallel Streams and Reactive Streams
  2. How to parallelize a sequential algorithm to obtain better performance without data inconsistencies and deadlocks
  3. How to implement the “map and reduce” and “map and collect” programming models
  4. Fork join framework for solving the problem using divide and conquer
  5. How to execute phased-based tasks in an efficient way with the Phaser components

Overall an impressive book for senior and experienced JAva developers to take their concurrency skills to the next level. If want you can also combine this book with the Parallel Computing and Java Multithreading course by Holczer Balazs on Udemy. It’s one of the best courses on this topic and I really like it.

These were my top 6 Java Concurrency and multi-threading books, which will help to learn concurrent programming and take advantage of today’s advanced multi-core processors.

All the books are useful for both beginners and experienced Java programmers to fill gaps on basics and learn tried and tested concurrent design principles, patterns, best practices, and things to avoid. Having said that, let us know if you find any other good books on Concurrency and threading.


Other Programming resources and Books you may like

Thanks for reading this article so far. If you like this article, then please share it with your friends and colleagues. If you have any questions or feedback, then please drop a note.

P.S. — If you are looking for a complete set of Java books to become an expert Java developer, you must see 10 Java books for experienced programmers.

P.S. S. — If you want to improve your coding skills irrespective of any programming skill then you should check out these 5 timeless classic coding books.

P. P. S — Quick Update, Pluralsight free weekend is here and you can access all 7000+ Pluralsight courses and projects for FREE this weekend. Make this count and learn a new skill or level up the existing one. Don’t miss this out, it’s only for this weekend. And here is the link again:

I am Java programmer, blogger, working on Java, J2EE, UNIX, FIX Protocol. I share Java tips on http://javarevisited.blogspot.com and http://java67.com