Confused about concurrency problem presented in wwdc24 video

Full details here swift-evolution/proposals/0338-clarify-execution-non-actor-async.md at main · swiftlang/swift-evolution · GitHub

In short, async functions always define where they run (which is the opposite of how systems like libdispatch work). nonisolated doesn't opt out of that, it just defines it as "the place where I run is not on any actor". In my opinion this is much easier to reason about because you never have to think "some async functions care about where they're called from and others don't", it's just "async functions never care about their caller".

8 Likes