public void run(){ // Server
Alternative alt = new Alternative(in);
int index;
while(true){
index = alt.fairSelect();
in[index].read();
toService.write(0);
fromService.read();
out[index].write(1);
}
}
}
Previous slide | Next slide | Back to first slide | View graphic version |