private PoolableConnection pollValidOrNull(Deque<PoolableConnection> q) {
        requireNonNull(q);
        PoolableConnection pc = q.pollLast();
        while (!isValidOrNull(pc)) {
            discard(pc); // If we discover an old connection, we discard it from the queue. Otherwise it will not be closed
            pc = q.pollLast();
        }
        return pc;
    }
A fully concurrent implementation of a connection pool.

@author Per Minborg
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/internal/component/ConnectionPoolComponentImpl.java