Asyncio.gather vs asyncio.wait
Although similar in general cases (“run and get results for many tasks”), each function has some specific functionality for other cases: asyncio.gather() Returns a Future instance, allowing high level grouping of tasks: import asyncio from pprint import pprint import random async def coro(tag): print(“>”, tag) await asyncio.sleep(random.uniform(1, 3)) print(“<“, tag) return tag loop = asyncio.get_event_loop() … Read more