Producer Thread
Producer Thread
class Producer implements Runnable {
Channel chan;
String alphabet= "abcdefghijklmnopqrstuvwxyz";
Producer(Channel c) { chan = c;}
public void run() {
int ai = 0;
while(true) {
for(int i=0;i<60; i++)
DisplayThread.rotate();
chan.out(new Character(alphabet.charAt(ai)));
ai=(ai+1) % alphabet.length();
}
}
}