Swift 6 · Errors and concurrency

Run work in parallel

async let starts child tasks that run concurrently.

async let first = fetchUser()
async let second = fetchPosts()
let (user, posts) = try await (first, second)

Official Swift 6 documentation

More errors and concurrency commands

All errors and concurrency commands · Swift 6 cheatsheet

Was this page helpful?