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: All tasks in a group can be cancelled by calling group2.cancel() or even all_groups.cancel(). See also .gather(…, return_exceptions=True), asyncio.wait() Supports waiting to be stopped after the first … Read more