Java Threads, 3rd Edition
Publisher: O'Reilly Media
Released: September 2004
Pages: 362

Threads are essential to Java programming, but learning to use them effectively is a nontrivial task. This new edition of the classic Java Threads shows you how to take full advantage of Java's threading facilities and brings you up-to-date with the watershed changes in Java 2 Standard Edition version 5.0 (J2SE 5.0). It provides a thorough, step-by-step approach to threads programming.

Java's threading system is simple relative to other threading systems. In earlier versions of Java, this simplicity came with tradeoffs: some of the advanced features in other threading systems were not available in Java. J2SE 5.0 changes all that: it provides a large number of new thread-related classes that make the task of writing multithreaded programs that much easier.

You'll learn where to use threads to increase efficiency, how to use them effectively, and how to avoid common mistakes. This book discusses problems like deadlock, race conditions, and starvation in detail, helping you to write code without hidden bugs.

Java Threads, Third Edition, has been thoroughly expanded and revised. It incorporates the concurrency utilities from java.util.concurrent throughout. New chapters cover thread performance, using threads with Swing, threads and Collection classes, thread pools, and threads and I/O (traditional, new, and interrupted). Developers who cannot yet deploy J2SE 5.0 can use thread utilities provided in the Appendix to achieve similar functionality with earlier versions of Java.

Topics include:

  • Lock starvation and deadlock detection
  • Atomic classes and minimal synchronization (J2SE 5.0)
  • Interaction of Java threads with Swing, I/O, and Collection classes
  • Programmatically controlled locks and condition variables (J2SE 5.0)
  • Thread performance and security
  • Thread pools (J2SE 5.0)
  • Thread groups
  • Platform-specific thread scheduling
  • Task schedulers (J2SE 5.0)
  • Parallelizing loops for multiprocessor machines
In short, this new edition of Java Threads covers everything you need to know about threads, from the simplest animation program to the most complex applications. If you plan to do any serious work in Java, you will find this book invaluable.

Scott Oaks is a senior software engineer for the Java Performance Engineering group at Sun Microsystems and the author of four books in the O'Reilly Java series. Formerly a senior systems engineer at Sun Microsystems, Henry Wong is an independent consultant working on various Java related projects.

Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyJava Threads, 3rd Edition
 
4.0

(based on 4 reviews)

Ratings Distribution

  • 5 Stars

     

    (3)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (1)

Reviewed by 4 customers

Sort by

Displaying reviews 1-4

Back to top

 
5.0

The best book on Java Threads

By Chan

from India

About Me Developer

Pros

  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Expert
    • Intermediate
    • Student

    Comments about oreilly Java Threads, 3rd Edition:

    One of the best things about this book is although this book was published in 2004, in my opinion it is still one of THE BEST books one can read on Java Threads.

    For beginners like me, understanding multi-threading concepts is not really easy. But this book made them easy for me.

    The book teaches you how to visualize the underlying concepts. The examples very clearly explain the concepts and are followed by authors' explanation ( the second best thing about this book ).

    I know I'm reading this book in 2013 and there are new additions in the newer Java versions but this book covers the advanced concepts introduced with J2SE 5.0 so well that I am not missing much. Whatever little needs to be known, I will be able to understand it from the API docs- thanks to such great explanation of the foundation to advanced concepts in the book. Having said that, if the authors decide to come up with another edition of the book, I will buy that too cause I know it'll be worth it.

    The first time I bought this book, I bought it from a local library. As I began reading this book, I realized I should have my own copy of it and I ordered it the same day. I'm glad I did so.

    Not sure who, but some wise person said- if something can be read without effort, great effort has gone into its writing. I appreciate all the effort that has gone into the making of Java Threads Edition 3. Thank you, Scott Oaks and Henry Wong.

    (3 of 3 customers found this review helpful)

     
    5.0

    Java Threads

    By TheTroubleshooter

    from NY

    About Me Designer, Developer, Sys Admin

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Intermediate
      • Student

      Comments about oreilly Java Threads, 3rd Edition:

      Used one of the examples in this book as one of the references in my Operating System research paper.

      (3 of 4 customers found this review helpful)

       
      5.0

      A must-read

      By Bernard

      from Undisclosed

      Comments about oreilly Java Threads, 3rd Edition:

      I happen not to agree with the previous review, everything is clearly explained in the book. For instance, p40, a lock is explained as:

      When a method is declared synchronized, the thread that wants to execute it must acquire a token, which we call a lock (...) Only one thread can grab a lock at a time (...) Upon completion of the method, the lock is automatically released.

      Sure, the thread topic is not for beginners, but since every program is going to use threads whether you want it or not, any self-respecting programmer should have a good knowledge of threads.

      This book also covers all the new thread-related class of Java 5.0, which is the reason why I bought it.

      (5 of 11 customers found this review helpful)

       
      1.0

      The Basics Are Missing

      By Dave

      from Undisclosed

      Comments about oreilly Java Threads, 3rd Edition:

      Very poor book. Many essential explanations are missing, possibly due in part to an apparent obsession with race conditions. Although race conditions are a very important topic, and they should be thoroughly covered in a book such as this, many of them can be avoided by knowing the basics, which this book does not explain well.

      For instance, look at lock() and unlock(). What is being locked? What is being unlocked? Basic questions, right? We are never really told. Although there is much text devoted to these methods, it is left to the reader to figure out the answer to these questions.

      The same is true for wait() and notify(). What is being waited on? Who is being notified? We are never really told, but rather we are left to try to put the descriptions together in a way that makes sense.

      There are many other areas of total confusion (including many pages devoted to a "race condition" that apparently does not exist), but the above examples should give you an idea of the caliber of this book.

      BTW, I have been in this business for 30+ years.

      Displaying reviews 1-4

      Back to top

       
      Buy 2 Get 1 Free Free Shipping Guarantee
      Buying Options
      Immediate Access - Go Digital what's this?
      Ebook: $31.99
      Formats:  DAISY, ePub, Mobi, PDF
      Print & Ebook: $43.95
      Print: $39.95