sequence.py 文件源码

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

项目:shellbot 作者: bernard357 项目源码 文件源码
def __init__(self, bot=None, machines=None, **kwargs):
        """
        Implements a sequence of multiple machines

        :param machines: the sequence of machines to be ran
        :type machines: list of Machine

        """
        self.bot = bot
        self.machines = machines

        self.lock = Lock()

        # prevent Manager() process to be interrupted
        handler = signal.signal(signal.SIGINT, signal.SIG_IGN)

        self.mutables = Manager().dict()

        # restore current handler for the rest of the program
        signal.signal(signal.SIGINT, handler)

        self.on_init(**kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号