worker.py 文件源码

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

项目:DPQ 作者: DiggerPlus 项目源码 文件源码
def main_work_horse(self, job):
        """This is the entry point of the newly spawned work horse."""
        # After fork()'ing, always assure we are generating random sequences
        # that are different from the worker.
        random.seed()
        self._is_horse = True
        self.log = Logger('horse')

        success = self.perform_job(job)

        # os._exit() is the way to exit from childs after a fork(), in
        # constrast to the regular sys.exit()
        os._exit(int(not success))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号