Buy Used
Used - Very Good See details
$3.44 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
Java Threads, Second Edition
 
 
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, Second Edition [Paperback]

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


Available from these sellers.


Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Paperback $24.53  
Paperback, January 27, 1999 --  
There is a newer edition of this item:
Java Threads Java Threads 3.4 out of 5 stars (41)
$24.53
In Stock.

Book Description

1565924185 978-1565924185 January 27, 1999 Second Edition

Threads aren't a new idea: many operating systems and languages support them. But despite widespread support, threads tend to be something that everyone talks about, but few use. Programming with threads has a reputation for being tricky and nonportable.

Not so with Java. Java's thread facilities are easy to use, and--like everything else in Java--are completely portable between platforms. And that's a good thing, because it's impossible to write anything but the simplest applet without encountering threads. If you want to work with Java, you have to learn about threads.

This new edition shows you how to take full advantage of Java's thread facilities: where to use threads to increase efficiency, how to use them effectively, and how to avoid common mistakes.

Java Threads discusses problems like deadlock, race condition, and starvation in detail, helping you to write code without hidden bugs. It brings you up to date with the latest changes in the thread interface for JDK 1.2.

The book offers a thorough discussion of the Thread and ThreadGroup classes, the Runnable interface, the language's synchronized operator. It explains thread scheduling ends by developing a CPUSchedule class, showing you how to implement your own scheduling policy. In addition, Java Threads shows you how to extend Java's thread primitives. Other extended examples include classes that implement reader/writer locks, general locks, locks at arbitrary scope, and asynchronous I/O. This edition also adds extensive examples on thread pools, advanced synchronization technique, like condition variables, barriers, and daemon locks. It shows how to work with classes that are not thread safe, and pays special attention to threading issues with Swing. A new chapter shows you how to write parallel code for multiprocessor machines.

In short, Java Threads covers everything you need to know about threads, from the simplest animation applet to the most complex applications. If you plan to do any serious work in Java, you will find this book invaluable. Examples available online. Covers Java 2.



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: 344 pages
  • Publisher: O'Reilly Media; Second Edition edition (January 27, 1999)
  • Language: English
  • ISBN-10: 1565924185
  • ISBN-13: 978-1565924185
  • Product Dimensions: 9.1 x 7 x 0.7 inches
  • Shipping Weight: 1.2 pounds
  • Average Customer Review: 3.4 out of 5 stars  See all reviews (41 customer reviews)
  • Amazon Best Sellers Rank: #1,992,411 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 review is from: Java Threads, Second Edition (Paperback)
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)
Browse and search another edition of this book.
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.
 
(2)

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


Listmania!




Look for Similar Items by Category


Look for Similar Items by Subject