servicetalk-concurrent-test-internal/src/main/java/io/servicetalk/concurrent/test/internal/AwaitUtils.java
/**
     * Await a {@link CountDownLatch} until the latch is counted down or the given time duration expires,
     * throws unchecked InterruptedException.
     * @param latch the {@link CountDownLatch} to await.
     * @param timeout the timeout duration to await for.
     * @param unit the units applied to {@code timeout}.
     * @return true if the count reached zero and false if the waiting time elapsed before the count reached zero
     */
Await a  CountDownLatch until the latch is counted down or the given time duration expires,
throws unchecked InterruptedException.
@param latch the  CountDownLatch to await.
@param timeout the timeout duration to await for.
@param unit the units applied to  timeout.
@return true if the count reached zero and false if the waiting time elapsed before the count reached zero
Await a CountDownLatch until the latch is counted down or the given time duration expires throws unchecked InterruptedException . @param latch the CountDownLatch to await . @param timeout the timeout duration to await for . @param unit the units applied to timeout . @return true if the count reached zero and false if the waiting time elapsed before the count reached zero
public static boolean await(CountDownLatch latch, long timeout, TimeUnit unit) {
        final long timeoutNanos = NANOSECONDS.convert(timeout, unit);
        try {
            return latch.await(timeoutNanos, NANOSECONDS);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throwException(e);
            return false;
        }
    }
public static boolean await ( CountDownLatch latch , long timeout , TimeUnit unit ) { final long timeoutNanos = NANOSECONDS . convert ( timeout , unit ) ; try { return latch . await ( timeoutNanos , NANOSECONDS ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throwException ( e ) ; return false ; } }
Await a {@link CountDownLatch} until the latch is counted down or the given time duration expires,
 throws unchecked InterruptedException.
Await a { @link CountDownLatch } until the latch is counted down or the given time duration expires throws unchecked InterruptedException .