boolean (@NotNull Semaphore semaphore, long timeoutInMillis) { return waitFor(remaining -> semaphore.tryAcquire(remaining, TimeUnit.MILLISECONDS) ? Boolean.TRUE : null, timeoutInMillis) == Boolean.TRUE; }