© Andrés Ibañez Kautsch 2023
A. I. KautschModern Concurrency on Apple Platformshttps://doi.org/10.1007/978-1-4842-8695-1_7

7. Sendable Types

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

The simplest concurrent programs are fairly isolated, even when they are dealing with concurrency. But in complex programs, you will need to pass data around across isolation boundaries, from one async task to another, from one actor to another. The data will need to be thread-safe. As we learned with Actors, sharing mutable data across asynchronous domains can result in data races and therefore data corruption.

Swift needed a way to define a safe way to share data across isolation boundaries. The Swift Evolution folks came up with a very elegant solution and introduced ...

Get Modern Concurrency on Apple Platforms: Using async/await with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.