public class ProcessWrite extends java.lang.Object implements CSProcess

ProcessWrite declaration, construction and use should normally be localised within a single method -- so we feel no embarassment about its public field. Its only (envisaged) purpose is as described in the example below.
| Output Channels | ||
|---|---|---|
| out | java.lang.Object | The out Channel can accept data of any Class. |
Parallel object in which to run them:
ChannelOutput out0, out1;
.
.
.
ProcessWrite write0 = new ProcessWrite (out0);
ProcessWrite write1 = new ProcessWrite (out1);
CSProcess parWrite01 = new Parallel (new CSProcess[] {out0, out1});
The above is best done once, before any looping over the
parallel write commences. A parallel write can now be performed
at any time (and any number of times) by executing:
write0.value = ...; // whatever we want sent down out0
write1.value = ...; // whatever we want sent down out1
parWrite01.run ();
The last line above terminates when, and only when, both writes have completed --
the events may occur in any order.Parallel,
ProcessRead,
ProcessReadInt,
ProcessWriteInt| Modifier and Type | Field and Description |
|---|---|
java.lang.Object |
value
The Object to be written to the channel
|
| Constructor and Description |
|---|
ProcessWrite(ChannelOutput out)
Construct a new ProcessWrite.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run()
The main body of this process.
|
public ProcessWrite(ChannelOutput out)
out - the channel to which to writeCopyright © 1996–2019. All rights reserved.