twistedreactor.py 文件源码

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

项目:python-dse-driver 作者: datastax 项目源码 文件源码
def __init__(self, *args, **kwargs):
        """
        Initialization method.

        Note that we can't call reactor methods directly here because
        it's not thread-safe, so we schedule the reactor/connection
        stuff to be run from the event loop thread when it gets the
        chance.
        """
        Connection.__init__(self, *args, **kwargs)

        self.is_closed = True
        self.connector = None

        reactor.callFromThread(self.add_connection)
        self._loop.maybe_start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号