def close(self):
        self._condition.acquire()
        try:
            while self._idle_cache: # close all idle connections
                con = self._idle_cache.pop(0)
                try:
                    con._close()
                except Exception:
                    pass
                self._connections -=1
            self._condition.notifyAll()
        finally:
            self._condition.release()
Close all connections in the pool.
dataset/ETHPy150Open bitly/asyncmongo/asyncmongo/pool.py/ConnectionPool.close