Advanced Swift Actors: Re-entrancy and Interleaving

<p>Conceptually, they&rsquo;re pretty simple: actors are reference-typed entities that enforce serial access to their methods and state. However, without understanding their nuances, it&rsquo;s hard to know whether an actor is the right tool for the job or if you&rsquo;re adding complexity.</p> <p>To help nurture your instinct for when to take an actor out of your toolbelt, I&rsquo;m going to guide us through a use case that affects almost all apps: authentication.</p> <p>I&rsquo;ll first explain the challenges of building an authentication service in your iOS app. We will use sequence diagrams to design exactly how our ideal system behaves. Next, I&rsquo;ll briefly cover core Swift concurrency concepts, explain how actors work under the hood, and discuss what is meant by re-entrancy. Finally, I&rsquo;ll bring these concepts together and demonstrate how we can use our knowledge of actors to implement an optimal authentication service in your iOS app.</p> <p><a href="https://betterprogramming.pub/advanced-swift-actors-re-entrancy-and-interleaving-1ad9bfa81f58">Website</a></p>