launch.py 文件源码

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

项目:Discord-ASM-Bot 作者: Emzi0767 项目源码 文件源码
def launch_process(executor, callback, **kwargs):
    try:
        while True:
            p = mp.Process(target=callback, kwargs=kwargs)
            p.start()
            loop = asyncio.get_event_loop()
            await loop.run_in_executor(executor, wait_for, p)

    except CancelledError:
        pass

    except KeyboardInterrupt:
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号