MainActor isolation
In Swift Concurrency, what's the difference between putting @MainActor on a whole view model class and putting it on specific methods only?
In Swift Concurrency, what's the difference between putting @MainActor on a whole view model class and putting it on specific methods only?
On the type, every stored property and method is isolated to the main actor, so other contexts have to await; on a method only, just that method runs on main and the rest of the state isn't protected. nonisolated takes immutable data and pure computation out of isolation.
ConcurrencyShort answerBasics
In Swift, what's the difference between a class and an actor?
#mainactor #isolation
ConcurrencyShort answerIntro
In a UIKit screen you set label.text = result inside a network response callback, and…
#ui
ConcurrencyShort answerExpert
This image cache actor built with Swift Concurrency sometimes sends two network requests…
#isolation
ConcurrencyShort answerAdvanced
You've been asked to move a large app written with completion handlers and GCD to Swift 6…
#mainactor