A suspension point doesnโt mean the current thread is blocked. Nor it means the current actor is blocked. All it means is that the current task / function is blocked / suspended / waiting for an asynchronous task to finish.
@MainActor func foo() async { doA() let b = await doB() doC() } When you get to doB(), then the MainActor / Main Thread are not suspended. Other tasks can be enqueued and executed on the main thread....
Swift Actors: few random notes
This post isnโt meant to explain how actors work. Rather just elaborate a few tiny details.
Iโm often curious about the origins of things. How people met, dated or how they began their careers or founded their companies. Similarly about namings, understanding the context often gives you a foundational understanding. I give feedback in Pull Requests about variable and type names or seek advice through code-review channels. First time it occurred was when someone explained that the reduce function means โhow you jam and reduce an entire array into a single valueโ....