AsyncSequence explained with Code Examples

AsyncSequence is part of the concurrency framework and the SE-298 proposal. Its name implies it's a type providing asynchronous, sequential, ...
Read More
ConcurrencySwift

AsyncThrowingStream and AsyncStream explained with code examples

AsyncThrowingStream and AsyncStream are part of the concurrency framework introduced in Swift 5.5 due to SE-314. Async streams allow you ...
Read More
ConcurrencySwift

Tasks in Swift explained with code examples

Tasks in Swift are part of the concurrency framework introduced at WWDC 2021. A task allows us to create a ...
Read More
ConcurrencySwift

Async await in Swift explained with code examples

Async await is part of the new structured concurrency changes that arrived in Swift 5.5 during WWDC 2021. Concurrency in ...
Read More
ConcurrencySwift

Sendable and @Sendable closures explained with code examples

Sendable and @Sendable are part of the concurrency changes that arrived in Swift 5.5 and address a challenging problem of ...
Read More
ConcurrencySwift

Nonisolated and isolated keywords: Understanding Actor isolation

SE-313 introduced the nonisolated and isolated keywords as part of adding actor isolation control. Actors are a new way of ...
Read More
ConcurrencySwift

Async let explained: call async functions in parallel

Async let is part of Swift's concurrency framework and allows instantiating a constant asynchronously. The concurrency framework introduced the concept ...
Read More
ConcurrencySwift

MainActor usage in Swift explained to dispatch to the main thread

MainActor is a new attribute introduced in Swift 5.5 as a global actor providing an executor which performs its tasks ...
Read More
ConcurrencySwift

Actors in Swift: how to use and prevent data races

Swift Actors are new in Swift 5.5 and are part of the big concurrency changes at WWDC 2021. Before actors, ...
Read More
ConcurrencySwift