This is a demo made for Swift && Tips
At some point in our lives as developers, we will have to work with concurrency. Concurrency is one of the most interesting topics in computer science, but also one of the most complicated to understand.
And of course, implementing concurrent code is hard to maintain and debug. In Swift we have many ways to solve concurrent issues, but, we still require a lot of intuition to detect where is a potential bug around.
However, that will change forever with the usage of Actors. Let’s explore today how they work and how building concurrent code is now safer.
In this video, we will learn how to use @MainActor to protect your mutable UI state and always send it to the main thread.
- Xcode 13+
- iOS 15+
- Swift 5.5+