if (numReaders == 0) throw new IllegalStateException("document lock failure");  synchronized (documentCV) {    if (currentWriter == null) { numReaders --; if (numReaders == 0 && numWritersWaiting != 0) documentCV.notify(); } }
  public void readUnlock()  {  }