public boolean waitForUnsafe(long msTimeout) throws InterruptedException {
    if (sync.tryAcquireShared(1) >= 0) return true;
    return sync.tryAcquireSharedNanos(1, TimeUnit.MILLISECONDS.toNanos(msTimeout));
  }
public boolean waitForUnsafe(long msTimeout)