/**Class readerx: implements a reader thread that terminates after calling * pause, startread pause, and endread, in that order. * @author Kg2s */ public class readerx extends Thread{ /**Thread id */ private int myid; /**timer */ private timer t; /**Scheduler class */ private scheduler s; public readerx(int myid0, timer t0, scheduler s0) { myid = myid0; t = t0; s = s0; } public void run(){ t.pause(); s.startread(myid); t.pause(); s.endread(myid); } }