00001 class InOut1 extends java.lang.Thread 00002 { 00003 BoundedBuffer in; 00004 BoundedBuffer out; 00005 00006 public InOut1(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 java.lang.System.out.println("Take 1"); 00019 this.out.add(tmp); 00020 java.lang.System.out.println("Put 1"); 00021 } 00022 } 00023 }