/**
 * Class writerx: implements a writer thread that terminates after calling 
 * pause, startread pause, and endread, in that order. 
 * @author Kg2s
 */
public class writerx extends Thread{
    private int myid;
    private timer t;
    private scheduler s;
    public writerx(int myid0, timer t0, scheduler s0) {
        myid = myid0;
        t = t0;
        s = s0;
    }
    // implement run()
    public void run(){
 
        t.pause();        
        s.startwrite(myid);
        t.pause();
        s.endwrite(myid);
 
    }   
 
}
Creative Commons License Valid CSS Valid XHTML 1.0 Driven by DokuWiki Powered by PHP Powered by Apache get firefox!! kgareth.com Recent changes RSS feed