code: public void awaitNextReadyWork() throws InterruptedException {
  	write.lockInterruptibly();
  	try {
  	    long next = getEarliestReadyEstimate();
  	    while (!workAvailable() && !waitingWork.isEmpty()) {
  		if (next > 0L) {
  		    workChanged.awaitNanos(next - System.nanoTime()); // Or signal
  		    next = getEarliestReadyEstimate(); // Might be new work added?
  		}
  	    }
  	} finally {
  	    write.unlock();
  	}
      }
docs: Awaits until the next work is ready (or the work queue is empty).
  
  @throws InterruptedException
  Whether the wait is interrupted.