7879808182838485868788
end = now + Math.min(time, Long.MAX_VALUE - now); } while (permits < min) { if (isClosed) { throw new IOSemaphoreClosedException(permits); } now = System.currentTimeMillis(); long rest = end - now; try {
124125126127128129130131132133134
end = now + Math.min(time, Long.MAX_VALUE - now); } while (permits < i) { if (isClosed) { throw new IOSemaphoreClosedException(permits); } now = System.currentTimeMillis(); long rest = end - now; try {
150151152153154155156157158159160
release(1); } public synchronized void release(int i) throws IOSemaphoreClosedException { if (isClosed) { throw new IOSemaphoreClosedException(permits); } permits += i; notifyAll(); }