📅  最后修改于: 2022-03-11 14:47:23.300000             🧑  作者: Mango
import asyncio
async def foo(loop):
print('foo')
loop.stop()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop) # <----
asyncio.ensure_future(foo(loop))
loop.run_forever()