threads.py 文件源码

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

项目:kobo 作者: release-engineering 项目源码 文件源码
def run(self):
        while (not self.kill) and (self.running or not self.pool.queue.empty()):
            try:
                item = self.pool.queue.get(timeout=self.get_timeout)
            except six.moves.queue.Empty:
                continue

            self.pool.queue_get_lock.acquire()
            self.pool.queue_processed += 1
            num = self.pool.queue_processed
            self.pool.queue_get_lock.release()

            try:
                self.process(item, num)
            except:
                self.failed = True
                self.pool.exceptions.append(sys.exc_info())
                self.pool.kill()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号