def __init__(self, initial=4, max_clients=100, tolerate_error=False, timeout_retries=2, **connargs):
        """
        Create a new pool
        :param int initial: The initial number of client objects to create
        :param int max_clients: The maximum amount of clients to create. These
          clients will only be created on demand and will potentially be
          destroyed once they have been returned via a call to
          :meth:`release_client`
        :param connargs: Extra arguments to pass to the Connection object's
        constructor
        """

        if initial <= 0:
            initial = 1

        if max_clients <= initial:
            max_clients = initial + 1

        self._q = Queue()
        self._connargs = connargs
        self._clients_in_use = 0
        self._max_clients = max_clients
        self._tolerate_error = tolerate_error
        self._timeout_retries = max(0, timeout_retries)
        self._lock = Lock()

        try:
            for x in range(initial):
                self._q.put(self._make_client())
        except NetworkError:
            if not tolerate_error:
                raise
def __init__ ( self , initial = 4 , max_clients = 100 , tolerate_error = False , timeout_retries = 2 , ** connargs ) : if initial <= 0 : initial = 1 if max_clients <= initial : max_clients = initial + 1 self . _q = Queue ( ) self . _connargs = connargs self . _clients_in_use = 0 self . _max_clients = max_clients self . _tolerate_error = tolerate_error self . _timeout_retries = max ( 0 , timeout_retries ) self . _lock = Lock ( ) try : for x in range ( initial ) : self . _q . put ( self . _make_client ( ) ) except NetworkError : if not tolerate_error : raise
Create a new pool
        :param int initial: The initial number of client objects to create
        :param int max_clients: The maximum amount of clients to create. These
          clients will only be created on demand and will potentially be
          destroyed once they have been returned via a call to
          :meth:`release_client`
        :param connargs: Extra arguments to pass to the Connection object's
        constructor