Wed Mar 11 12:15:36 PST 1998
Class DataThread
Class DataThread
java.lang.Object
|
+----java.lang.Thread
|
+----DataThread
- class DataThread
- extends Thread
A DataThread waits for data to be sent to it.
In this case a single integer is sent each time.
- See Also:
- wait(), notify()
Variable Index
-
n
- Input buffer
-
whofor
-
Constructor Index
-
DataThread()
-
Method Index
-
run()
-
-
sent(int)
- Place data into buffer and notify threads
-
wait_for_number()
- Wait for a number to arrive
Variables
n
protected int n
- Input buffer
whofor
protected DataThread whofor
Constructors
DataThread
public DataThread()
Methods
sent
public synchronized void sent(int n)
- Place data into buffer and notify threads
wait_for_number
protected synchronized void wait_for_number()
- Wait for a number to arrive
run
public abstract void run()
- Overrides:
- run in class Thread