00001 final class Stage1 extends java.lang.Thread 00002 { 00003 00004 public void run () 00005 { 00006 java.lang.System.out.println("Stage1 startup"); 00007 int tmp = -1; 00008 while (tmp != 0) 00009 { 00010 if ((tmp = Heap.c1.take()) != 0) 00011 { 00012 Heap.c2.add((tmp + 1)); 00013 } 00014 } 00015 Heap.c2.stop(); 00016 java.lang.System.out.println("Stage1 shutdown"); 00017 } 00018 }