views:

967

answers:

10

Which book or books would you recommend for learning the ins and outs of Java 5's Concurrency and most importantly why?

What I'm looking for exactly is a book which especially goes through the Java 5's new concurrency mechanisms (i.e. java.util.concurrent package) and could also be used to learn most of what there is to learn about concurrency in general. Also feel free to recommend any other book you think could help me in tackling this important topic.

+4  A: 

Java Concurrency in Practice by Brian Goetz with Tim Peierls, Josh Bloch, Doug Lea etc

oxbow_lakes
+18  A: 

Java Concurrency in Practice is the best introduction. It describes all the Java 5 concurrency utilities and how to use them. It also covers what the core issues are with concurrent programming in general.

Concurrent Programming in Java by Doug Lea is a good reference. A lot of java.util.concurrent is based on this book.

Ben Lings
I'd say that JCiP wins over CPiJ, especially since Doug Lea is one of the co-authors. Lea's original book was very helpful in the old days but plenty of that information is overcome by events now.
Bob Cross
+2  A: 

10 brief laws of Java concurrency with explanations: http://www.javaspecialists.eu/archive/Issue146.html

Vanger
+1  A: 

There is also a nice chapter on Java concurrency in "Clean Code" by Robert C. Martin. Of course, one chapter does not justify buying a book. But in this case the other chapters are worth reading, too :-)

jens
Clean Code is a great book as is and I've already actually read it :)
Esko
+1  A: 

JCIP as noted is probably the de facto reference. I would however suggest also considering the concurrency chapter in Effective Java 2nd Edition by Joshua Bloch. Beyond just concurrency, there is a wealth of knowledge in that book.

jridley
A: 

Is there any open source library which can show some implementations of the advice in JCIP...this would help understand the design practices !!

iceman
+2  A: 

The Art of Multiprocessor Programming

+2  A: 

I've written a somewhat popular Java concurrency series too, here:

http://tutorials.jenkov.com/java-concurrency/index.html

Jakob Jenkov
A: 

Here is an article on basics of Java concurrency which is a must to know before diving into the java.util.concurrent

http://javatip.com/2010/07/core-java/concurrency/thread-safe-without-synchronization

Vadym Ustymenko
A: 

The art of multiprocessor programming definitely helps to understand the working of the concurrent data structures. After reading nuts and bolts from this book, you can go through Java specific tutorials or any available book.

JavaTechie