public E poll(){
  E result=buffer.poll();
  if (producer != null) {
    producer.wakeUp();
  }
  return result;
}

public E poll ( ) { E result = buffer . poll ( ) ; if ( producer != null ) { producer . wakeUp ( ) ; } return result ; }
check if there is any item in the queue
