org.erights.e.elib.oldeio
Class CharPipeAdapter
java.lang.Object
|
+--org.erights.e.elib.oldeio.CharPipeAdapter
- All Implemented Interfaces:
- Thunk
- public class CharPipeAdapter
- extends Object
- implements Thunk
Untamed: Moves characters from a Reader to a Writer in a blocking loop, which should
be run in a separate vat & runner.
- Author:
- Mark S. Miller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myReader
private Reader myReader
myWriter
private Writer myWriter
CharPipeAdapter
public CharPipeAdapter(Reader reader,
Writer writer)
- Enabled: May be called from any thread.
- Parameters:
reader
- Assumed to be thread-safe.writer
- Assumed to be thread-safe.
run
public Object run()
- Enabled: Should only be called from the new vat.
Normal users should only call start(String)
- Specified by:
run
in interface Thunk
start
public Object[] start(String optName)
- Enabled:
- Parameters:
optName
- Names the newly created vat
- Returns:
- A pair of the new vat and the outcomeVow for when the io is
finished.
comments?