Consumer Thread

Consumer Thread

class Consumer implements Runnable {

Channel chan;

Consumer(Channel c) {chan = c;}

public void run() {

while(true) {

for(int i=0;i<30; i++)

DisplayThread.rotate();

Character v = (Character)chan.in();

for(int i=0;i<30; i++)

DisplayThread.rotate();

}

}

}

Previous slide Next slide Back to the first slide View Graphic Version