servicetalk-concurrent-test-internal/src/main/java/io/servicetalk/concurrent/test/internal/AwaitUtils.java
/**
     * {@link BlockingQueue#poll(long, TimeUnit)} from the queue, throws unchecked Exception if
     * thread is interrupted while waiting.
     * @param queue the queue to poll from.
     * @param timeout the timeout duration to poll for.
     * @param unit the units applied to {@code timeout}.
     * @param <T> The types of objects in the queue.
     * @return see {@link BlockingQueue#poll(long, TimeUnit)}.
     */
BlockingQueue#poll(long, TimeUnit) from the queue, throws unchecked Exception if
thread is interrupted while waiting.
@param queue the queue to poll from.
@param timeout the timeout duration to poll for.
@param unit the units applied to  timeout.
@param  The types of objects in the queue.
BlockingQueue#poll ( long TimeUnit ) from the queue throws unchecked Exception if thread is interrupted while waiting . @param queue the queue to poll from . @param timeout the timeout duration to poll for . @param unit the units applied to timeout . @param The types of objects in the queue .
@Nullable
    public static <T> T poll(BlockingQueue<T> queue, long timeout, TimeUnit unit) {
        try {
            return queue.poll(timeout, unit);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throwException(e);
            return null;
        }
    }
@ Nullable public static < T > T poll ( BlockingQueue < T > queue , long timeout , TimeUnit unit ) { try { return queue . poll ( timeout , unit ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throwException ( e ) ; return null ; } }
{@link BlockingQueue#poll(long, TimeUnit)} from the queue, throws unchecked Exception if
 thread is interrupted while waiting.
{ @link BlockingQueue#poll ( long TimeUnit ) } from the queue throws unchecked Exception if thread is interrupted while waiting .