阅读背景:

使用asyncio时,如何在关闭事件循环之前完成所有正在运行的任务

来源:互联网 

I have the following code:

我有以下代码:

@asyncio.coroutine
def do_something_periodically():
    while True:
        asyncio.async(my_expensive_operation())
        yield from asyncio.sleep(my_interval)
        if shutdown_flag_is_set:
            print("Shutting down")
            break
@asyncio



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: