
Java Threads, 3rd Edition
Understanding and Mastering Concurrent Programming
Publisher: O'Reilly Media
Release Date: June 2009
Pages: 360
Read on Safari with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
- 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
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