站内搜索: 请输入搜索关键词
当前页面: 图书首页 > Java Threads, Third Edition

Table of Contents - Java Threads, Third Edition

Previous Section  < Day Day Up >  Next Section

  
• Table of Contents
• Index
• Reviews
• Reader Reviews
• Errata
• Academic
Java Threads, Third Edition
By Scott Oaks, Henry Wong
 
Publisher: O'Reilly
Pub Date: September 2004
ISBN: 0-596-00782-5
Pages: 360
   


   Copyright
   Preface
      Who Should Read This Book?
      Versions Used in This Book
      What's New in This Edition?
      Organization of This Book
      Conventions Used in This Book
      Code Examples
      How to Contact Us
      Safari Enabled
      Acknowledgments
      Chapter 1.  Introduction to Threads
      Section 1.1.  Java Terms
      Section 1.2.  About the Examples
      Section 1.3.  Why Threads?
      Section 1.4.  Summary
      Chapter 2.  Thread Creation and Management
      Section 2.1.  What Is a Thread?
      Section 2.2.  Creating a Thread
      Section 2.3.  The Lifecycle of a Thread
      Section 2.4.  Two Approaches to Stopping a Thread
      Section 2.5.  The Runnable Interface
      Section 2.6.  Threads and Objects
      Section 2.7.  Summary
      Chapter 3.  Data Synchronization
      Section 3.1.  The Synchronized Keyword
      Section 3.2.  The Volatile Keyword
      Section 3.3.  More on Race Conditions
      Section 3.4.  Explicit Locking
      Section 3.5.  Lock Scope
      Section 3.6.  Choosing a Locking Mechanism
      Section 3.7.  Nested Locks
      Section 3.8.  Deadlock
      Section 3.9.  Lock Fairness
      Section 3.10.  Summary
      Chapter 4.  Thread Notification
      Section 4.1.  Wait and Notify
      Section 4.2.  Condition Variables
      Section 4.3.  Summary
      Chapter 5.  Minimal Synchronization Techniques
      Section 5.1.  Can You Avoid Synchronization?
      Section 5.2.  Atomic Variables
      Section 5.3.  Thread Local Variables
      Section 5.4.  Summary
      Chapter 6.  Advanced Synchronization Topics
      Section 6.1.  Synchronization Terms
      Section 6.2.  Synchronization Classes Added in J2SE 5.0
      Section 6.3.  Preventing Deadlock
      Section 6.4.  Deadlock Detection
      Section 6.5.  Lock Starvation
      Section 6.6.  Summary
      Chapter 7.  Threads and Swing
      Section 7.1.  Swing Threading Restrictions
      Section 7.2.  Processing on the Event-Dispatching Thread
      Section 7.3.  Using invokeLater( ) and invokeAndWait( )
      Section 7.4.  Long-Running Event Callbacks
      Section 7.5.  Summary
      Chapter 8.  Threads and Collection Classes
      Section 8.1.  Overview of Collection Classes
      Section 8.2.  Synchronization and Collection Classes
      Section 8.3.  The Producer/Consumer Pattern
      Section 8.4.  Using the Collection Classes
      Section 8.5.  Summary
      Chapter 9.  Thread Scheduling
      Section 9.1.  An Overview of Thread Scheduling
      Section 9.2.  Scheduling with Thread Priorities
      Section 9.3.  Popular Threading Implementations
      Section 9.4.  Summary
      Chapter 10.  Thread Pools
      Section 10.1.  Why Thread Pools?
      Section 10.2.  Executors
      Section 10.3.  Using a Thread Pool
      Section 10.4.  Queues and Sizes
      Section 10.5.  Thread Creation
      Section 10.6.  Callable Tasks and Future Results
      Section 10.7.  Single-Threaded Access
      Section 10.8.  Summary
      Chapter 11.  Task Scheduling
      Section 11.1.  Overview of Task Scheduling
      Section 11.2.  The java.util.Timer Class
      Section 11.3.  The javax.swing.Timer Class
      Section 11.4.  The ScheduledThreadPoolExecutor Class
      Section 11.5.  Summary
      Chapter 12.  Threads and I/O
      Section 12.1.  A Traditional I/O Server
      Section 12.2.  A New I/O Server
      Section 12.3.  Interrupted I/O
      Section 12.4.  Summary
      Chapter 13.  Miscellaneous Thread Topics
      Section 13.1.  Thread Groups
      Section 13.2.  Threads and Java Security
      Section 13.3.  Daemon Threads
      Section 13.4.  Threads and Class Loading
      Section 13.5.  Threads and Exception Handling
      Section 13.6.  Threads, Stacks, and Memory Usage
      Section 13.7.  Summary
      Chapter 14.  Thread Performance
      Section 14.1.  Overview of Performance
      Section 14.2.  Synchronized Collections
      Section 14.3.  Atomic Variables and Contended Synchronization
      Section 14.4.  Thread Creation and Thread Pools
      Section 14.5.  Summary
      Chapter 15.  Parallelizing Loops for Multiprocessor Machines
      Section 15.1.  Parallelizing a Single-Threaded Program
      Section 15.2.  Multiprocessor Scaling
      Section 15.3.  Summary
      Appendix A.  Superseded Threading Utilities
      Section A.1.  The BusyFlag Class
      Section A.2.  The CondVar Class
      Section A.3.  The Barrier Class
      Section A.4.  The RWLock Class
      Section A.5.  The ThreadPool Class
      Section A.6.  The JobScheduler Class
      Section A.7.  Summary
   Colophon
   Index
Previous Section  < Day Day Up >  Next Section