mpetests.py 文件源码

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

项目:PyExPool 作者: eXascaleInfolab 项目源码 文件源码
def terminationHandler(cls, signal=None, frame=None, terminate=True):
        """Signal termination handler

        signal  - raised signal
        frame  - origin stack frame
        terminate  - whether to terminate the application
        """
        #if signal == signal.SIGABRT:
        #   os.killpg(os.getpgrp(), signal)
        #   os.kill(os.getpid(), signal)

        if cls._execpool:
            del cls._execpool  # Destructors are caled later
            # Define _execpool to avoid unnessary trash in the error log, which might
            # be caused by the attempt of subsequent deletion on destruction
            cls._execpool = None  # Note: otherwise _execpool becomes undefined
        if terminate:
            sys.exit()  # exit(0), 0 is the default exit code.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号