reactor.py 文件源码

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

项目:Parlay 作者: PromenadeSoftware 项目源码 文件源码
def maybeblockingCallFromThread(self, callable, *args, **kwargs):
        """
        Call callable from the reactor thread.  If we are in the reactor thread, then call it and return a Deferred.
        If we are *not* in the reactor thread, then block on that deferred instal of returning it
        """
        # if we're in the reactor thread then just call it
        if self.in_reactor_thread():
            return callable(*args, **kwargs)
        else:
            return twisted_threads.blockingCallFromThread(self._reactor, lambda: callable(*args, **kwargs))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号