class Delta implements CSProcess{
ChannelInputInt in;
ChannelOutputInt out1;
ChannelOutputInt out2;
public Delta(ChannelInputInt in,
ChannelOutputInt out1,
ChannelOutputInt out2){
this.in = in;
this.out1 = out1;
this.out2 = out2;
}
public void run(){
while(true){
int item = in.read();
new Parallel( new CSProcess[]{
new ProcWriteInt(out1, item),
new ProcWriteInt(out2, item)
}).run();
} } }
Previous slide | Next slide | Back to first slide | View graphic version |