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

4. Structured Concurrency

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

So far, we have talked extensively about what async/await is and how it works. We have seen how this new tool can help us write structured code akin to procedural programming because we can get rid of other types of callbacks that break the linear readability of our code, such as closures and delegates. But we have seen that all this code doesn’t actually run at the same time, concurrently, or in a multithreaded manner.

Consider the async version of the authenticateAndFetchProfile method from the Social Media App we wrote in Chapter 2 (Listing 4-1).
func authenticateAndFetchProfile() ...

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.