code: final boolean waitForEvent() throws InterruptedException {
          // must get the event count BEFORE releasing the read locks
          // to avoid a lost update
          final int oldEventCount = eventLock.getEventCount();
          final int readLockCount = releaseReadLocks();
          if (readLockCount == 0)
              throw new IllegalStateException("Must hold read lock");
          if (getWriteHoldCount() > 0)
              throw new IllegalStateException("Must not hold write lock");
          try {
              return eventLock.wait(oldEventCount);
          } finally {
              acquireReadLocks(readLockCount);
          }
      }
docs: Temporarily suspend read locks and wait for an event to be posted.
  Block until an event is posted.
  <p>
  N.B. this blocking method may wake up spuriously, and should be called from a loop that tests for the exit condition.
  
  @return <code>true</code> if an event was posted, and
  <code>false</code> if the wait returned spuriously or timed out.
  @throws InterruptedException if the thread was interrupted while waiting.
  @throws IllegalStateException if the current thread does not hold a read lock
  @throws IllegalStateException if the current thread holds a write lock