(self)
Close all pooled connections and disable the pool.
Close all pooled connections and disable the pool.
Close all pooled connections and disable the pool .
def close(self):
        """
        Close all pooled connections and disable the pool.
        """
        if self.pool is None:
            return
        # Disable access to the pool
        old_pool, self.pool = self.pool, None

        try:
            while True:
                conn = old_pool.get(block=False)
                if conn:
                    conn.close()

        except queue.Empty:
            pass
def close ( self ) : if self . pool is None : return # Disable access to the pool old_pool , self . pool = self . pool , None try : while True : conn = old_pool . get ( block = False ) if conn : conn . close ( ) except queue . Empty : pass