cluster.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:python-dse-driver 作者: datastax 项目源码 文件源码
def shutdown(self):
        """
        Close all connections.  ``Session`` instances should not be used
        for any purpose after being shutdown.
        """
        with self._lock:
            if self.is_shutdown:
                return
            else:
                self.is_shutdown = True

        # PYTHON-673. If shutdown was called shortly after session init, avoid
        # a race by cancelling any initial connection attempts haven't started,
        # then blocking on any that have.
        for future in self._initial_connect_futures:
            future.cancel()
        wait_futures(self._initial_connect_futures)

        for pool in tuple(self._pools.values()):
            pool.shutdown()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号