Cargando…

Java threads /

Threads are essential to Java programming, but learning to use them effectively is a nontrivial task. This new edition of the classic Java Threads shows you how to take full advantage of Java's threading facilities and brings you up-to-date with the watershed changes in Java 2 Standard Edition...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Oaks, Scott
Otros Autores: Wong, Henry, 1965-
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Sebastopol, CA : O'Reilly & Associates, 2004.
Edición:3rd ed.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Table of Contents; 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; Introduction to Threads; Java Terms; Java Versions, Tools, and Code; About the Examples; Compiling and Running the Examples; Why Threads?; Nonblocking I/O; Alarms and Timers; Independent Tasks; Parallelizable Algorithms; Summary; Thread Creation and Management; What Is a Thread?; Creating a Thread; The Example Architecture; The Thread Class
  • The Lifecycle of a ThreadCreating a Thread; Starting a Thread; Terminating a Thread; Pausing, Suspending, and Resuming Threads; Thread Cleanup; Two Approaches to Stopping a Thread; Setting a Flag; Interrupting a Thread; The Runnable Interface; Threads and Objects; Determining the Current Thread; Summary; Example Classes; Data Synchronization; The Synchronized Keyword; The Volatile Keyword; More on Race Conditions; Explicit Locking; Lock Scope; Synchronized Blocks; Choosing a Locking Mechanism; The Lock Interface; Nested Locks; Deadlock; Lock Fairness; Summary; Example Classes
  • Thread NotificationWait and Notify; The Wait-and-Notify Mechanism and Synchronization; wait(), notify(), and notifyAll(); Wait-and-Notify Mechanism with Synchronized Blocks; Condition Variables; Summary; Example Classes; Minimal Synchronization Techniques; Can You Avoid Synchronization?; The Effect of Registers; The Effect of Reordering Statements; Double-Checked Locking; Atomic Variables; Overview of the Atomic Classes; Using the Atomic Classes; Variable substitution; Changing algorithms; Retrying operations; Notifications and Atomic Variables; Summary of Atomic Variable Usage; Data exchange
  • Compare and setAdvanced atomic data types; Bulk data modification; Thread Local Variables; Inheritable Thread Local Variables; Summary; Example Classes; Advanced Synchronization Topics; Synchronization Terms; Synchronization Classes Added in J2SE 5.0; Semaphore; Barrier; Countdown Latch; Exchanger; Reader/Writer Locks; Preventing Deadlock; Deadlock and Automatic Lock Releases; Preventing Deadlock with Timeouts; Deadlock Detection; Lock Starvation; Lock Starvation and Reader/Writer Locks; Summary; Example Classes; Threads and Swing; Swing Threading Restrictions
  • Processing on the Event-Dispatching ThreadUsing invokeLater() and invokeAndWait(); Long-Running Event Callbacks; Summary; Example Classes; Threads and Collection Classes; Overview of Collection Classes; Collection Interfaces; Threadsafe Collection Classes; Thread-Unsafe Collection Classes; Thread-Notification Collection Classes; Synchronization and Collection Classes; Simple Synchronization; Complex Synchronization; Iterators and Enumerations; Thread-Aware Classes; The Producer/Consumer Pattern; Using the Collection Classes; Summary; Example Classes; Thread Scheduling