Limit search to available items
Book Cover
E-book
Author Oaks, Scott.

Title Java threads / Scott Oaks and Henry Wong
Edition 3rd ed
Published Sebastopol, CA : O'Reilly & Associates, 2004

Copies

Description 1 online resource (340 pages) : illustrations
Contents 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
Summary 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 version 5.0 (J2SE 5.0). It provides a thorough, step-by-step approach to threads programming. Java's threading system is simple relative to other threading systems. In earlier versions of Java, this simplicity came with tradeoffs: some of the advanced features in other threading systems were not availa
Notes "Covers J2SE 5.0"--Cover
Includes index
Print version record
Subject Java (Computer program language)
Threads (Computer programs)
COMPUTERS -- Programming Languages -- C♯
COMPUTERS -- Programming Languages -- Java.
COMPUTERS -- Programming Languages -- Pascal.
Java (Computer program language)
Threads (Computer programs)
Form Electronic book
Author Wong, Henry, 1965-
ISBN 9780596518271
0596518277
9781449366667
144936666X