(self, address, options, handshake=True)
:Parameters:
          - `address`: a (hostname, port) tuple
          - `options`: a PoolOptions instance
          - `handshake`: whether to call ismaster for each new SocketInfo
:Parameters:
          - `address`: a (hostname, port) tuple
          - `options`: a PoolOptions instance
          - `handshake`: whether to call ismaster for each new SocketInfo
: Parameters : - address : a ( hostname port ) tuple - options : a PoolOptions instance - handshake : whether to call ismaster for each new SocketInfo
def __init__(self, address, options, handshake=True):
        """
        :Parameters:
          - `address`: a (hostname, port) tuple
          - `options`: a PoolOptions instance
          - `handshake`: whether to call ismaster for each new SocketInfo
        """
        # Check a socket's health with socket_closed() every once in a while.
        # Can override for testing: 0 to always check, None to never check.
        self._check_interval_seconds = 1

        self.sockets = set()
        self.lock = threading.Lock()
        self.active_sockets = 0

        # Keep track of resets, so we notice sockets created before the most
        # recent reset and close them.
        self.pool_id = 0
        self.pid = os.getpid()
        self.address = address
        self.opts = options
        self.handshake = handshake

        if (self.opts.wait_queue_multiple is None or
                self.opts.max_pool_size is None):
            max_waiters = None
        else:
            max_waiters = (
                self.opts.max_pool_size * self.opts.wait_queue_multiple)

        self._socket_semaphore = thread_util.create_semaphore(
            self.opts.max_pool_size, max_waiters)
        self.socket_checker = SocketChecker()
def __init__ ( self , address , options , handshake = True ) : # Check a socket's health with socket_closed() every once in a while. # Can override for testing: 0 to always check, None to never check. self . _check_interval_seconds = 1 self . sockets = set ( ) self . lock = threading . Lock ( ) self . active_sockets = 0 # Keep track of resets, so we notice sockets created before the most # recent reset and close them. self . pool_id = 0 self . pid = os . getpid ( ) self . address = address self . opts = options self . handshake = handshake if ( self . opts . wait_queue_multiple is None or self . opts . max_pool_size is None ) : max_waiters = None else : max_waiters = ( self . opts . max_pool_size * self . opts . wait_queue_multiple ) self . _socket_semaphore = thread_util . create_semaphore ( self . opts . max_pool_size , max_waiters ) self . socket_checker = SocketChecker ( )