00001 class InOut2 extends java.lang.Thread 00002 { 00003 BoundedBuffer in; 00004 BoundedBuffer out; 00005 00006 public InOut2(BoundedBuffer ins, BoundedBuffer outs) 00007 { 00008 this.in = ins; 00009 this.out = outs; 00010 } 00011 00012 public void run () 00013 { 00014 java.lang.Object tmp; 00015 while (true) 00016 { 00017 tmp = this.in.take(); 00018 this.out.add(tmp); 00019 } 00020 } 00021 }