Books & Videos

Table of Contents

  1. Chapter 1 Introduction to Threads

    1. Java Terms

    2. About the Examples

    3. Why Threads?

    4. Summary

  2. Chapter 2 Thread Creation and Management

    1. What Is a Thread?

    2. Creating a Thread

    3. The Lifecycle of a Thread

    4. Two Approaches to Stopping a Thread

    5. The Runnable Interface

    6. Threads and Objects

    7. Summary

  3. Chapter 3 Data Synchronization

    1. The Synchronized Keyword

    2. The Volatile Keyword

    3. More on Race Conditions

    4. Explicit Locking

    5. Lock Scope

    6. Choosing a Locking Mechanism

    7. Nested Locks

    8. Deadlock

    9. Lock Fairness

    10. Summary

  4. Chapter 4 Thread Notification

    1. Wait and Notify

    2. Condition Variables

    3. Summary

  5. Chapter 5 Minimal Synchronization Techniques

    1. Can You Avoid Synchronization?

    2. Atomic Variables

    3. Thread Local Variables

    4. Summary

  6. Chapter 6 Advanced Synchronization Topics

    1. Synchronization Terms

    2. Synchronization Classes Added in J2SE 5.0

    3. Preventing Deadlock

    4. Deadlock Detection

    5. Lock Starvation

    6. Summary

  7. Chapter 7 Threads and Swing

    1. Swing Threading Restrictions

    2. Processing on the Event-Dispatching Thread

    3. Using invokeLater( ) and invokeAndWait( )

    4. Long-Running Event Callbacks

    5. Summary

  8. Chapter 8 Threads and Collection Classes

    1. Overview of Collection Classes

    2. Synchronization and Collection Classes

    3. The Producer/Consumer Pattern

    4. Using the Collection Classes

    5. Summary

  9. Chapter 9 Thread Scheduling

    1. An Overview of Thread Scheduling

    2. Scheduling with Thread Priorities

    3. Popular Threading Implementations

    4. Summary

  10. Chapter 10 Thread Pools

    1. Why Thread Pools?

    2. Executors

    3. Using a Thread Pool

    4. Queues and Sizes

    5. Thread Creation

    6. Callable Tasks and Future Results

    7. Single-Threaded Access

    8. Summary

  11. Chapter 11 Task Scheduling

    1. Overview of Task Scheduling

    2. The java.util.Timer Class

    3. The javax.swing.Timer Class

    4. The ScheduledThreadPoolExecutor Class

    5. Summary

  12. Chapter 12 Threads and I/O

    1. A Traditional I/O Server

    2. A New I/O Server

    3. Interrupted I/O

    4. Summary

  13. Chapter 13 Miscellaneous Thread Topics

    1. Thread Groups

    2. Threads and Java Security

    3. Daemon Threads

    4. Threads and Class Loading

    5. Threads and Exception Handling

    6. Threads, Stacks, and Memory Usage

    7. Summary

  14. Chapter 14 Thread Performance

    1. Overview of Performance

    2. Synchronized Collections

    3. Atomic Variables and Contended Synchronization

    4. Thread Creation and Thread Pools

    5. Summary

  15. Chapter 15 Parallelizing Loops for Multiprocessor Machines

    1. Parallelizing a Single-Threaded Program

    2. Multiprocessor Scaling

    3. Summary

  1. Appendix A Superseded Threading Utilities

    1. The BusyFlag Class

    2. The CondVar Class

    3. The Barrier Class

    4. The RWLock Class

    5. The ThreadPool Class

    6. The JobScheduler Class

    7. Summary

  2. Colophon