Roast topics
Find topics
Roast it!
Roast topics
Find topics
Find it!
Login
From:
Ole Begemann
(Uncensored)
subscribe
Where View.task gets its main-actor isolation from – Ole Begemann
https://oleb.net/2022/swiftui-task-mainactor/
links
backlinks
If you call SwiftUI’s task modifier inside a view’s body property, the async operation will run on the main actor. However, this isn’t the case if you call task from a helper property or function that isn’t main-actor-annotated. Why?