def get_connection(self, command_name, *keys, **options):
    '\n        Get a connection, blocking for ``self.timeout`` until a connection\n        is available from the pool.\n\n        If the connection returned is ``None`` then creates a new connection.\n        Because we use a last-in first-out queue, the existing connections\n        (having been returned to the pool after the initial ``None`` values\n        were added) will be returned before ``None`` values. This means we only\n        create new connections when we need to, i.e.: the actual number of\n        connections will only increase in response to demand.\n        '
    self._checkpid()
    connection = None
    try:
        connection = self.pool.get(block=True, timeout=self.timeout)
    except Empty:
        raise ConnectionError('No connection available.')
    if (connection is None):
        connection = self.make_connection()
    return connection
Get a connection, blocking for ``self.timeout`` until a connection
is available from the pool.

If the connection returned is ``None`` then creates a new connection.
Because we use a last-in first-out queue, the existing connections
(having been returned to the pool after the initial ``None`` values
were added) will be returned before ``None`` values. This means we only
create new connections when we need to, i.e.: the actual number of
connections will only increase in response to demand.
def get_connection(self, command_name, *keys, **options):
    '\n        Get a connection, blocking for ``self.timeout`` until a connection\n        is available from the pool.\n\n        If the connection returned is ``None`` then creates a new connection.\n        Because we use a last-in first-out queue, the existing connections\n        (having been returned to the pool after the initial ``None`` values\n        were added) will be returned before ``None`` values. This means we only\n        create new connections when we need to, i.e.: the actual number of\n        connections will only increase in response to demand.\n        '
    self._checkpid()
    connection = None
    try:
        connection = self.pool.get(block=True, timeout=self.timeout)
    except Empty:
        raise ConnectionError('No connection available.')
    if (connection is None):
        connection = self.make_connection()
    return connection