Taming Java threads /
Learning how to write multithreaded applications is the key to taking full advantage of the Java platform. In Taming Java Threads, well-known columnist and Java expert Allen Holub provides Java programmers with the information they need to write real multithreaded programsprograms with real code. Ho...
| Main Author: | |
|---|---|
| Corporate Author: | |
| Format: | eBook |
| Language: | English |
| Published: |
Berkeley, Calif. :
Apress,
[2000]
|
| Series: | Books for professionals by professionals
|
| Subjects: | |
| Online Access: | Connect to the full text of this electronic book |
Table of Contents:
- Ch. 1. The Architecture of Threads. The Problems with Threads. Threads and Processes. Thread Safety and Synchronization. Concurrency, or How Can You Be Two Places at Once (When You're Really Nowhere at All). Get Your Priorities Straight. Cooperate! Wrapping Up
- Ch. 2. The Perils of Multithreaded Programming. Monitors and Exclusion Semaphores (Mutex). Race Conditions and Spin Locks. Threads Are Not Objects. Deadlock. Get out the Magnifying Glass. Nested-Monitor Lockout. Time Out! Why Is suspend() Deprecated? Deadlock on a Blocking I/O Operation. Stopping Threads. Starvation and Synchronizing run(). The volatile Keyword. Exceptions and Threads
- Ch. 3. The Mutex and Lock Management. When synchronized Isn't Good Enough. Handling Granularity with synchronized. Roll Your Own Semaphores: The Semaphore Interface. Managing Semaphores and Deadlock-Resistant Locking. Implementing a Manageable Mutex Class
- Ch. 4. Condition Variables and Counting Semaphores. Condition Variables. Condition Sets: Waiting for Multiple Conditions. Counting Semaphores for Managing Resource Pools. Wrapping Up
- Ch. 5. Timers, Alarms, and Swing Thread Safety. Why a Timer? Swingin' Threads: Swing Isn't Thread Safe. Using the Swing Timer. Roll Your Own Timer: Implementing the Alarm Class. Summing Up
- Ch. 6. Observers and Multicasters. Implementing Observer in a Multithreaded World. Observer-side Problems: Inner-class Synchronization. Notifier-side Problems: Notifications in a Multithreaded World. Mysteries of the AWTEventMulticaster. Building a Multicaster
- Ch. 7. Singletons, Critical Sections, and Reader/Writer Locks. Critical Sections, Singletons, and the "Class Object" Singletons. Reader/Writer Locks. It's a Wrap
- Ch. 8. Threads in an Object-Oriented World. Modeling Threads in Object-Oriented Systems. Thread Pools and Blocking Queues. Sockets and Thread Pools
- Ch. 9. Object-Oriented Threading Architectures. Reactors and Active Objects. Synchronous Dispatching and Round-Robin Scheduling: Reactors and Proactors. Asynchronous Dispatching: Active Objects. That's It
- Ch. 10. If I Were King: Fixing Java's Threading Problems. The Task. Improvements to synchronized. Improvements to wait() and notify(). Fixing the Thread Class. Inter-Thread Coordination. Internal Support for Reader/Writer Locks. Access to Partially Constructed Objects Should Be Illegal. Volatile Should Always Work as Expected. Access Issues. Singleton Destruction. Abrupt Shut Down of Daemon Threads. Bring Back the stop(), suspend(), and resume() Methods. Blocking I/O Should Work Correctly. The ThreadGroup Class. Wrapping Up.