Code example for BlockingQueue

Methods: peek, put

0
    */ 
   public void putAsync(String key, String value) {
      this.key = key;
      this.value = value;
      try { 
         trace("::putAsync::send contains: " + send.peek());
         send.put(PUT_ASYNC);
      } catch (InterruptedException e) {
         throw new IllegalStateException(e);
      } 
   } 
 
   /** 
    * Only returns when this thread is stopped. 
    */ 
   public void stopThread() { 
      try { 
         send.put(new Integer(1));
         Object o = receive.take();
         trace("::stopThread::took out of receive: " + o);
      } catch (InterruptedException e) {