def clean(cls, pid):
        """Clean the specified pool, removing any closed connections or
        stale locks.

        :param str pid: The pool id to clean

        """
        with cls._lock:
            try:
                cls._ensure_pool_exists(pid)
            except KeyError:
                LOGGER.debug('Pool clean invoked against missing pool %s', pid)
                return
            cls._pools[pid].clean()
            cls._maybe_remove_pool(pid)
def clean ( cls , pid ) : with cls . _lock : try : cls . _ensure_pool_exists ( pid ) except KeyError : LOGGER . debug ( 'Pool clean invoked against missing pool %s' , pid ) return cls . _pools [ pid ] . clean ( ) cls . _maybe_remove_pool ( pid )
Clean the specified pool, removing any closed connections or
        stale locks.

        :param str pid: The pool id to clean