In Swift’s concurrency model, you can handle multiple concurrent streams of work using async let or the TaskGroup API. Both approaches allow you to perform concurrent tasks and wait for their results.
Option 1: Using async let
async let is a concise way to launch multiple tasks concurrently and wait for their results.
func fetchData() async throws -> (String, Int, Bool) { async let stringResult = doSomethingAsync() async let intResult = somethingElseAsync() async let boolResult = thirdThingAsync()