def has_idle_connection(cls, pid):
        """Check to see if a pool has an idle connection

        :param str pid: The pool ID
        :rtype: bool

        """
        with cls._lock:
            cls._ensure_pool_exists(pid)
            return bool(cls._pools[pid].idle_connections)