Understanding @isolated(any)

A @MainActor class passes a closure to a protocol method. The closure fires on a task and the closure is called within the Task. Here is how @isolated(any) solves the problem of landing in the closure in a different context instead of the same context which created it!.

May 14, 2026 · 6 min