Swift by Sundell cover image

99: “Structured concurrency”, with special guest Doug Gregor

Swift by Sundell

00:00

How Does Async Await Work?

Each actor instance has its own like lightweight serialization mechanism in it. And so when you when you try to call a method on the actor from sort of outside the actor, either the actor might be free already. It's not doing any work, in which case you could just run immediately and even on the same operating system thread. So there's no overhead if the actor is already free. You just sort of take ownership of the actor, run your code on it until it it leaves that actor and then the actors free to do other work.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app