REVIEW - Java Concurrency in Practice


Title:

Java Concurrency in Practice

Author:

Brian Goetz, Tim Peierls

ISBN:

Publisher:

Pearson Education (2006)

Pages:

403pp

Reviewer:

Paul Thomas

Reviewed:

April 2007

Rating:

★★★★★


There are two ways of looking at this book: one is as a guide to the java.util.concurreny.* packages introduced with Java 1.5, the other is as a treatise on modern multi-threaded programming in Java. The two go hand in hand of course: the concurrency package was added as a result of JSR-133 - the Java Community Process work on threading and memory model.

If you want to get fully up to date with multithreading in Java, then you really should take the time to read this book. It covers just about every aspect of threading from the general issues of concurrency to the specifics of implementing custom synchronisers using the AbstractQueuedSynchroniser base class. In fact, I'd go further and say that if you are interested in concurrency at all, regardless of the language you use, then you should read this book. It's more than just teaching you how to use some Java classes. Topics such as composability of thread safe classes can apply to all modern program design. And I don't think I've come across a book that deals with testing multithreaded classes before.

It wouldn't work as a reference book, but mine will be sitting on the desk for some time. It needs to be read and re-read. If you want to flick through looking for a specific example, the examples of broken code are clearly labelled with a sick-face motif. Just a little detail, but one that could make all the difference!

As well as covering the technical details of threading, locking and memory models, the book is filled with snippets of information about the implementation of JVMs. One example is the discussion of the relative merits of explicit locks vs. implicit locking via 'synchronized'. Not only are we shown profiling data to show how the techniques scale, but we are told how work on Java 6 has drastically changed the situation for the better. The authors don't just state that atomic variables are lighter than locks - they explain in great detail why it might be so. This sort of detail makes the difference between knowing a subject and really understanding.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.