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_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() ...
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