6 ms·
Main actor by default is a decent strategy. It's usually pretty obvious when something needs to happen off the main actor.
by trevor-e 1y ago
Main actor by default is a decent strategy. It's usually pretty obvious when something needs to happen off the main actor.
- favorited 1y agoEspecially in apps, where most of the code will be about preparing the user interface and handling events. And it's relatively easy to make most lower-level components actor-agnostic – either by making them conform to Sendable, by making them actors, or by giving them their own internal synchronization.