My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
Java Threads, Third Edition
By
Scott Oaks
,
Henry Wong
September 2004
Pages: 358
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Chapter 1
Introduction to Threads
Java Terms
About the Examples
Why Threads?
Summary
Chapter 2
Thread Creation and Management
What Is a Thread?
Creating a Thread
The Lifecycle of a Thread
Two Approaches to Stopping a Thread
The Runnable Interface
Threads and Objects
Summary
Chapter 3
Data Synchronization
The Synchronized Keyword
The Volatile Keyword
More on Race Conditions
Explicit Locking
Lock Scope
Choosing a Locking Mechanism
Nested Locks
Deadlock
Lock Fairness
Summary
Chapter 4
Thread Notification
Wait and Notify
Condition Variables
Summary
Chapter 5
Minimal Synchronization Techniques
Can You Avoid Synchronization?
Atomic Variables
Thread Local Variables
Summary
Chapter 6
Advanced Synchronization Topics
Synchronization Terms
Synchronization Classes Added in J2SE 5.0
Preventing Deadlock
Deadlock Detection
Lock Starvation
Summary
Chapter 7
Threads and Swing
Swing Threading Restrictions
Processing on the Event-Dispatching Thread
Using invokeLater( ) and invokeAndWait( )
Long-Running Event Callbacks
Summary
Chapter 8
Threads and Collection Classes
Overview of Collection Classes
Synchronization and Collection Classes
The Producer/Consumer Pattern
Using the Collection Classes
Summary
Chapter 9
Thread Scheduling
An Overview of Thread Scheduling
Scheduling with Thread Priorities
Popular Threading Implementations
Summary
Chapter 10
Thread Pools
Why Thread Pools?
Executors
Using a Thread Pool
Queues and Sizes
Thread Creation
Callable Tasks and Future Results
Single-Threaded Access
Summary
Chapter 11
Task Scheduling
Overview of Task Scheduling
The java.util.Timer Class
The javax.swing.Timer Class
The ScheduledThreadPoolExecutor Class
Summary
Chapter 12
Threads and I/O
A Traditional I/O Server
A New I/O Server
Interrupted I/O
Summary
Chapter 13
Miscellaneous Thread Topics
Thread Groups
Threads and Java Security
Daemon Threads
Threads and Class Loading
Threads and Exception Handling
Threads, Stacks, and Memory Usage
Summary
Chapter 14
Thread Performance
Overview of Performance
Synchronized Collections
Atomic Variables and Contended Synchronization
Thread Creation and Thread Pools
Summary
Chapter 15
Parallelizing Loops for Multiprocessor Machines
Parallelizing a Single-Threaded Program
Multiprocessor Scaling
Summary
Appendix A
Superseded Threading Utilities
The BusyFlag Class
The CondVar Class
The Barrier Class
The RWLock Class
The ThreadPool Class
The JobScheduler Class
Summary
Colophon
Return to
Java Threads