or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Sell Back Your Copy
For a $0.60 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Java Threads
 
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Java Threads [Paperback]

Scott Oaks (Author), Henry Wong (Author)
3.4 out of 5 stars  See all reviews (41 customer reviews)

List Price: $39.95
Price: $24.53 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $15.42 (39%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it delivered Tuesday, January 31? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Paperback $24.53  
Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Book Description

0596007825 978-0596007829 September 17, 2004 Third Edition

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.


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Java Threads + Java Network Programming, Third Edition + Java Concurrency in Practice
Price For All Three: $80.54

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • Java Network Programming, Third Edition $21.99

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • Java Concurrency in Practice $34.02

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

Amazon.com Review

Building sophisticated Java applets means learning about threading--if you need to read data from a network, for example, you can't afford to let a delay in its delivery lock up your entire applet. Java Threads introduces the Java threading API and uses non-computing analogies--such as scenarios involving bank tellers--to explain the need for synchronization and the dangers of deadlock. Scott Oaks and Henry Wong follow up their high-level examples with more detailed discussions on building a thread scheduler in Java, dealing with advanced synchronization issues, and handling exceptions. --This text refers to an out of print or unavailable edition of this title.

From Library Journal

O'Reilly books have a reputation among programmers for providing some of the best technical information for professionals. No exception, these three web-related books will only enhance O'Reilly's reputation. JavaScript is not Java, but it is very useful because JavaScript code does not need to be compiled and the scripts can be embedded directly into an HTML document. Flanagan's work is an excellent book for programmers interested in learning it quickly. Grand, meanwhile, provides an exceptionally clear discussion of Java itself that is particularly useful for a working programmer moving from C++ to Java. Threads are what makes Java a particularly useful language for multiprocessing?the ability to appear to do more than one thing at a time?which is what the Internet is all about. The tricky part of threads is that the concept is new for most users. Oaks offers a very clear discussion of how to spawn a process, when to spawn, and how to synchronize and schedule it, all illustrated with good network examples.
Copyright 1997 Reed Business Information, Inc. --This text refers to an out of print or unavailable edition of this title.

Product Details

  • Paperback: 360 pages
  • Publisher: O'Reilly Media; Third Edition edition (September 17, 2004)
  • Language: English
  • ISBN-10: 0596007825
  • ISBN-13: 978-0596007829
  • Product Dimensions: 9.5 x 6.8 x 0.8 inches
  • Shipping Weight: 1 pounds (View shipping rates and policies)
  • Average Customer Review: 3.4 out of 5 stars  See all reviews (41 customer reviews)
  • Amazon Best Sellers Rank: #234,937 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

41 Reviews
5 star:
 (14)
4 star:
 (10)
3 star:
 (3)
2 star:
 (5)
1 star:
 (9)
 
 
 
 
 
Average Customer Review
3.4 out of 5 stars (41 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

30 of 30 people found the following review helpful:
5.0 out of 5 stars 3rd Edition is a whole new book, September 28, 2004
By 
This review is from: Java Threads (Paperback)
I also have an old copy of the 2nd Edition, which I would have given 3 stars. However, the 3rd Edition might as well have been published as a new book. I was pleasantly surprised to see that the organization, chapter layout and code examples are essentially all new - not just tweaked from the previous edition. If you're looking for a good book on threads, this is it.

The example code is well done, and the concepts are illustrated satisfactorily. If you download the examples from the web site, each chapter has a list of the code samples and the ant tasks to run to use them, which was a nice touch. While the concepts behind Java Threads apply to most versions of Java, I'd say this book is really geared toward the J2SE 5.0 environment.

It's too bad Amazon can't reset the rating for each edition, as the 3rd Edition is quite an improvement. Be sure to check out reviews starting in September 2004, when this book was published.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


25 of 25 people found the following review helpful:
4.0 out of 5 stars A good overview of the subject for intermediate programmers, October 17, 2000
By 
W. A. Norris (Redmond, WA United States) - See all my reviews
(VINE VOICE)    (REAL NAME)   
This isn't the best O'Reilly book in the Java series, but it will provide a reasonably good overview of the subject. I wouldn't recommend this book to beginning programmers, because the topic of threading is overly complex for beginners. Look for a general Java book that gives you some simple templates for using threads, if you need them for something. I also wouldn't recommend this for advanced programmers who have special needs in the area of threading. A more advanced book would survey how real JVMs actually perform thread scheduling, comparing them and provide tips for programmers who ned really precise timing or scheduling optimization. Likewise, if you know most of the ins and outs of preventing deadlocks off the top of your head, this book isn't going to teach you very much.

Who this book is good for is experienced programmers who need to understand the ins and outs of making their applications threadsafe. If you don't have much (or any) background in threading or you've forgotten some things, this book will cover the topic thoroughly, and demonstrate common pitfalls. It's ideal for people who need to code up things like database connection pools, complex synchronized-access data structures, and statically-accessed resources. As others have mentioned, some of the examples are kind of synthetic and fake, but the book is still extremely usable, and it's an easy read.

This book is also effective at covering timed and recurring tasks in Java 1.1 and 1.2, though Java 1.3 now has new helper classes (Timer and TimedTask) that this book doesn't cover. Then again, if you understand how to do it in 1.1 and 1.2 (and really, even if you don't), understanding the new 1.3 classes is dead easy.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


20 of 21 people found the following review helpful:
4.0 out of 5 stars Not a bad introduction to threading in Java., September 21, 1998
By A Customer
This book is not academic, nor does it offer a very rigorous approach to the subject of Concurrent Programming. This book will not work for everyone. However, I believe it does offer basic, solid threading to many new people for most everyday programming tasks.

Threading is not an incredibly difficult or complex topic. Threading is an advanced programming topic. Solid programming knowledge is prerequiste.

If you already are proficient in writing threaded code in other languages, I would not recommend (buying) this book. Simply reading the interface for Thread and Runnable may suffice. Java's threading support is quite elegant; you shouldn't have major problems figuring things out.

Threading is kind of confusing at first because it involves calling procedures for the sole purpose of timing. That is, a correctly written program will use a set of procedures in such a way that when a call returns, it will be safe to access shared data.

This book is not concise as it could be, but if you are a reasonably experienced and intellegent programmer, you should be able to handle most basic sychronization tasks after reading this book. It is written in style that goes like this:

1. It introduces a problem.

2. It briefly shows a solution a student might suggest.

3. It then explains why this doesn't work.

4. It finally explains the proper solution.

You need to understand why something is correct or not, not only how to do it correctly. Whether or not you like the particular approach used in this book is a matter of personal preference.

After reading this book, I would recommend a good textbook on concurrent programming to further and more rigorously study issues of sychronization, starvation, control, and deadlock.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
table generator, data synchronization, deadlock detection, using atomic variables, context classloader, lock starvation, thread pool executor, concurrent hashmap, loop printer, random character generator, contended lock, loop handler, score lock, using explicit locks, runnable object, deadlock check, callable object, animation thread, lock node, typing game, thread local variable, atomic classes, synchronized keyword, done flag, int threads
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Single-Threaded Program, Advanced Synchronization Topics, Description Main Java, Swing Type Tester, Interrupted Exception, Minimal Synchronization Techniques, Multiprocessor Scaling, Task Scheduling, Synchronization Classes Added, Windows Server, Two Approaches, Got New Lock, Waiting For Lock, Already Own Lock, Preventing Deadlock, Popular Threading Implementations, Reentrant Lock, Can You Avoid Synchronization, Sun Microsystems, Thread Notification
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:


What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(6)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject