Is there an API for awaiting multiple async results at once? Something akin to asyncio.gather() in Python, Promise.all() in javascript, or when() in PromiseKit?
await all barrier primitive for async/await?
You can do this with a TaskGroup
. Use async
on the group to add all the individual tasks, then await the next
result.
I think you can async let
to kick off the tasks and then await a tuple of results.