BlockingQueue.poll

Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.

@param timeout how long to wait before giving up, in units of {@code unit} @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter @return the head of this queue, or {@code null} if the specified waiting time elapses before an element is available @throws InterruptedException if interrupted while waiting

  1. E poll(Duration timeout)
    interface BlockingQueue(E)
    E
    poll
    (
    Duration timeout
    )
  2. alias poll = Queue!E.poll

Meta