code: public boolean await() throws InterruptedException {
      boolean noTimeout = true;
      // Use a loop and a boolean to avoid spurious time outs.
      try {
        while (!isSignal && noTimeout) {
          noTimeout = conditionVar.await(timeoutPeriod, timeoutUnits);
        }
      } finally {
        isSignal = false;
      }
      return noTimeout;
    }
docs: Wait for a signal on the condition. Must call {@code lock()} first
  and {@code unlock()} afterwards.
  @return A boolean value that indicates whether or not a signal was received. False
  indicates a timeout occurred before a signal was received.
  @throws InterruptedException The calling thread was interrupted by another thread.