Object API Used for WaitNotify

Chapter 8 - Inter-thread Communication

Java Thread Programming
Paul Hyde
  Copyright 1999 Sams Publishing

Summary
Threads can communicate and signal each other by several mechanisms in Java. The wait/notify mechanism ( wait() , notify() , and notifyAll() ) provides a multithread-safe way for one thread to signal another that a value has changed. I showed you that it is important to make sure to avoid missed notifications and early notifications.
In addition, threads can use the join() method of Thread to wait for other threads to die. A thread can also stream data through a pipe to another thread using the classes PipedInputStream , PipedOutputStream , PipedReader , and PipedWriter .
Threads can also use thread-specific variables that keep a different value for different threads by using the classes ThreadLocal and InheritableThreadLocal .

Toc


Java Thread Programming
Java Thread Programming
ISBN: 0672315858
EAN: 2147483647
Year: 2005
Pages: 149
Authors: Paul Hyde

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net