type_util.py 文件源码

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

项目:pytypes 作者: Stewori 项目源码 文件源码
def start(self):
        if self._active:
            raise RuntimeError('type checker already running')
        elif self._pending:
            raise RuntimeError('type checker already starting up')
        self._pending = True
        # Install this instance as the current profiler
        self._previous_profiler = sys.getprofile()
        self._set_caller_level_shift(0)
        sys.setprofile(self)

        # If requested, set this instance as the default profiler for all future threads
        # (does not affect existing threads)
        if self.all_threads:
            self._previous_thread_profiler = threading._profile_hook
            threading.setprofile(self)
        self._active, self._pending = True, False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号