6
当试图运行在文档中给出的ASYNCIO的hello world代码示例:ASYNCIO事件环路闭合
import asyncio
async def hello_world():
print("Hello World!")
loop = asyncio.get_event_loop()
# Blocking call which returns when the hello_world() coroutine is done
loop.run_until_complete(hello_world())
loop.close()
我得到的错误:
RuntimeError: Event loop is closed
我使用Python 3.5.3。