servicetalk-concurrent-test-internal/src/main/java/io/servicetalk/concurrent/test/internal/AwaitUtils.java
/**
     * {@link BlockingQueue#take()} from the queue or throws unchecked exception in the case
     * of InterruptedException.
     * @param queue The queue to take from.
     * @param <T> The types of objects in the queue.
     * @return see {@link BlockingQueue#take()}.
     */
BlockingQueue#take() from the queue or throws unchecked exception in the case
of InterruptedException.
@param queue The queue to take from.
@param  The types of objects in the queue.
BlockingQueue#take () from the queue or throws unchecked exception in the case of InterruptedException . @param queue The queue to take from . @param The types of objects in the queue .
@SuppressWarnings("unchecked")
    public static <T> T take(BlockingQueue<T> queue) {
        try {
            return queue.take();
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throwException(e);
            return (T) new Object();
        }
    }
@ SuppressWarnings ( "unchecked" ) public static < T > T take ( BlockingQueue < T > queue ) { try { return queue . take ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throwException ( e ) ; return ( T ) new Object ( ) ; } }
{@link BlockingQueue#take()} from the queue or throws unchecked exception in the case
 of InterruptedException.
{ @link BlockingQueue#take () } from the queue or throws unchecked exception in the case of InterruptedException .
// Returning Object cast to type T is not necessary as the method will either return or throw exception // before even reaching this statement. However, this is necessary to compile successfully.