REVIEW - Java Threads

Title:

Java Threads

Author:

Scott Oaks, Henry Wong

ISBN:

1565924185

Publisher:

O'Reilly (1999)

Pages:

319pp

Reviewer:

Steve Cornish

Reviewed:

December 1999

Rating:

★★★☆☆

This is a good book, and certainly, if you're using threads in Java non-trivially then you should have this book.

This book is an update to the first edition to take advantage of the changes introduced by Java 2. The first four chapters cover the fundamentals of Java Threads that most readers will already be familiar with. These include the Thread and Applet classes, the Runnable interface and the synchronized keyword. However, these chapters are still worth reading as they go into a detail not covered in any Java tutorial book before. As an example, the authors present to the reader which methods have been deprecated on the Thread class, why they were deprecated, and how to achieve the removed functionality properly.

The rest of the book contains information, discussion and examples on common threading issues such as preventing deadlock, preventing lock starvation and thread scheduling. The examples start off trivial, but soon descend into the kind of problems you really could come across.

This is a good book, and certainly, if you're using threads in Java non-trivially then you should have this book. Otherwise, borrow a copy and read the first half to make yourself aware of the threading issues in Java. Even better, think how your code affects others; the section on mixing threads with thread unsafe classes should make you aware of the wider issues surrounding your code, and hopefully, you'll produce well behaved classes that will be easily multi- threaded if the need arises? Do you use the collections? Think hard...


Book cover image courtesy of Open Library.