Skip to Content
Modern Concurrency on Apple Platforms: Using async/await with Swift
book

Modern Concurrency on Apple Platforms: Using async/await with Swift

by Andrés Ibañez Kautsch
November 2022
Intermediate to advanced content levelIntermediate to advanced
213 pages
3h 46m
English
Apress
Content preview from Modern Concurrency on Apple Platforms: Using async/await with Swift
© Andrés Ibañez Kautsch 2023
A. I. KautschModern Concurrency on Apple Platformshttps://doi.org/10.1007/978-1-4842-8695-1_8

8. The Main Actor & Final Actors

Andrés Ibañez Kautsch1  
(1)
La Paz, Bolivia
 

In Chapter 6, we learned about actors. Actors are reference types that synchronize their own internal state, so it is safe to mutate them from different threads. This is done by guaranteeing that only one task or thread can mutate the actor’s state at a time. Actors are sendable types meant to be used in a concurrent context. Actors are types that you instantiate and, for the most part, treat as normal classes. But what happens when we need something that is always guaranteed to run on the same thread, but when it may be spread out, even across different ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Asynchronous Programming with SwiftUI and Combine: Functional Programming to Build UIs on Apple Platforms

Asynchronous Programming with SwiftUI and Combine: Functional Programming to Build UIs on Apple Platforms

Peter Friese
Concurrency in Go

Concurrency in Go

Katherine Cox-Buday

Publisher Resources

ISBN: 9781484286951Purchase LinkPublisher Website