4
asyncio.ensure_future 대 BaseEventLoop.create_task 대 단순 코 루틴?
asyncio에 대한 몇 가지 기본 Python 3.5 자습서가 다양한 방식으로 동일한 작업을 수행하는 것을 보았습니다. 이 코드에서 : import asyncio async def doit(i): print("Start %d" % i) await asyncio.sleep(3) print("End %d" % i) return i if __name__ == '__main__': loop = asyncio.get_event_loop() #futures = [asyncio.ensure_future(doit(i), loop=loop) for i in range(10)] …