|
Threads aren`t a new idea: many operating systems and languages support them. Until Java, threads tended to be something that everyone talked about, but few used. Programming with threads was tricky and non portable.
Not so with Java. Java`s thread facilities are easy to use, and like everything else in Java are 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 of the classic Java Threads shows you how to take full advantage of Java`s thread facilities, and brings you up to date with the latest changes in the thread interface for JDK 2. 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 condition, and starvation in detail, helping you to write code without hidden bugs.
Java Threads, Second Edition, offers a thorough discussion of the Thread and ThreadGroup classes, the Runnable interface, and the language`s synchronized operator. It explains how threads are scheduled on different platforms, and shows you how to develop a CPUScheduler class that implements your own scheduling policy. 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 showing how to implement thread pools and other synchronization techniques, 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, this new edition of 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. ISBN: 9788173660573
|
|
Pages : 336
|