threads.py 文件源码

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

项目:kobo 作者: release-engineering 项目源码 文件源码
def stop(self):
        """Wait for the worker threads to process all items in queue.

        This method blocks until there is no more work left.

        It is essential to call this method. If you do any work in between
        ``start`` and ``stop``, make sure the ``stop`` method will always be
        called, otherwise the program will never exit.
        """
        for i in self.threads:
            i.running = False
        for i in self.threads:
            i.join()
        if self.exceptions:
            exc_info = self.exceptions[0]
            six.reraise(exc_info[0], exc_info[1], exc_info[2])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号