1 / 219
文档名称:

Java Threads (Java Series).pdf

格式:pdf   页数:219
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Java Threads (Java Series).pdf

上传人:doc1888 2015/11/10 文件大小:0 KB

下载得到文件列表

Java Threads (Java Series).pdf

相关文档

文档介绍

文档介绍:Java Threads, 2nd edition

Scott Oaks & Henry Wong

2nd Edition January 1999
ISBN: 1-56592-418-5, 332 pages

Revised and expanded to cover Java 2, Java Threads shows you how to
take full advantage of Java's thread facilities: where to use threads to
increase efficiency, how to use them effectively, and how to avoid
common mistakes.
It thoroughly covers the Thread and ThreadGroup classes, the Runnable
interface, and the language's synchronized operator.
The book pays special attention to threading issues with Swing, as well
as problems like deadlock, race condition, and starvation to help you
write code without hidden bugs.



Table of Contents


Preface 1

1. Introduction to Threading 5
Java Terms
Thread Overview
Why Threads?
Summary

2. The Java Threading API 12
Threading Using the Thread Class
Threading Using the Runnable Interface
The Life Cycle of a Thread
Thread Naming
Thread Access
More on Starting, Stopping, and Joining
Summary

3. Synchronization Techniques 31
A Banking Example
Reading Data Asynchronously
A Class to Perform Synchronization
The Synchronized Block
Nested Locks
Deadlock
Return to the Banking Example
Synchronizing Static Methods
Summary

4. Wait and Notify 50
Back to Work (at the Bank)
Wait and Notify
wait(), notify(), and notifyAll()
wait() and sleep()
Thread Interruption
Static Methods (Synchronization Details)
Summary

5. Useful Examples of Java Thread Programming 64
Data Structures and Containers
Simple Synchronization Examples
work Server Class
The AsyncInputStream Class
Using TCPServer with AsyncInputStreams
Summary

6. Java Thread Scheduling 87
An Overview of Thread Scheduling
When Scheduling Is Important
Scheduling with Thread Priorities
Popular Scheduling Implementations
Native Scheduling Support
Other Thread-Scheduling Methods
Summary