I have just finished reading “Java Thread Programming” by Paul Hyde. I have never gotten my hands dirty with concurrent programming in java and it is a matter of great consternation and distress to me every time I need to write multithreaded code or go for a job interview (For some reasons, multithreading seems to be a favorite trivia topic with interviewers). I know the basics but not enough to call myself even intermediately skilled in it. Not that I haven’t tried. But every time I picked up a book on multithreading, I found myself helplessly entangled in the confusing Java Swing examples the author had used to explain esoteric concurrency concepts. I dislike Swing. I have never used it. And I could never find a single book that explained multithreading with simple server side code snippets alluding never or rarely to Swing examples. Until I found the aforementioned book by Paul Hyde. This is the first multithreading book that I thoroughly enjoyed for its simple, easy to understand language.
The book is divided into two parts. Part I contains ten short yet lucidly written chapters covering the basic concepts from how to create a thread to more complex topics like thread intercommunication. Part II of the book is dedicated to useful tips and tricks like thread pooling etc.
Paul has used simple code examples in most of the places and has kept Swing/AWT examples to a minimum. Instead of peppering Swing code everywhere, he has written a separate chapter explaining how multithreading can be used in Java GUI programming. Personally I found this to be the best introductory book on Java multithreading. It is the unofficial “Head First…” book of java multithreading. You can download the source code from the book’s official web page.
This book was published in 1999 and therefore does not cover the new concurrent APIs introduced in Java 5. But if you scratch your head every time you come across a synchronization block, this is the book for you. Specially if you, like me, get confused and lost in the labyrinthian Swing examples that most books on this subject contain.
Thanks, Paul. I now feel well equipped to start hacking concurrent programming.