code: public void waitFor(Guard guard) throws InterruptedException {
      if (!((guard.monitor == this) & lock.isHeldByCurrentThread())) {
        throw new IllegalMonitorStateException();
      }
      if (!guard.isSatisfied()) {
        await(guard, true);
      }
    }
docs: Waits for the guard to be satisfied. Waits indefinitely, but may be interrupted. May be called
  only by a thread currently occupying this monitor.
  
  @throws InterruptedException if interrupted while waiting