public Future<E> pollAsync(){
  Future<E> result=null;
  final ReentrantLock lock=this.lock;
  lock.lock();
  try {
    E item=items.poll();
    if (item == null) {
      ExchangeCountDownLatch<E> c=new ExchangeCountDownLatch<>(1);
      waiters.addLast(c);
      result=new ItemFuture<>(c);
    }
 else {
      result=new ItemFuture<>(item);
    }
  }
  finally {
    lock.unlock();
  }
  return result;
}

public Future < E > pollAsync ( ) { Future < E > result = null ; final ReentrantLock lock = this . lock ; lock . lock ( ) ; try { E item = items . poll ( ) ; if ( item == null ) { ExchangeCountDownLatch < E > c = new ExchangeCountDownLatch < > ( 1 ) ; waiters . addLast ( c ) ; result = new ItemFuture < > ( c ) ; } else { result = new ItemFuture < > ( item ) ; } } finally { lock . unlock ( ) ; } return result ; }
request an item from the queue asynchronously
