Swift Concurrency by Tutorials
Swift Concurrency by Tutorials
Summary:
Introduction
The book Swift Concurrency by Tutorials (2022, 296 pages) from the Raywenderlich team is a practical guide to the new asynchronous system in Swift 5.5 and above. The authors, known for their high-quality tutorials, offer a step-by-step approach to mastering async/await, Task, Actor, and Structured Concurrency. The book is aimed at iOS and macOS developers who are already familiar with the basics of Swift and want to write safer and more efficient asynchronous code.
What the book is about
The material covers all key concepts of modern multithreading in Swift. Starting with the basics of async/await, the authors gradually move on to more complex topics: creating and managing Tasks, using TaskGroup for parallel operations, working with Actors to protect mutable state, and integrating with existing callback and Combine code. Each chapter contains practical projects that can be run immediately in Xcode.
Who this book is for
The book is intended for intermediate iOS/macOS developers who already know how to write in Swift and have encountered asynchronous problems (e.g., callback hell or complexity with GCD). Beginners in Swift should first master the basics of the language and then return to this book. It will also be useful for those who want to transition from old approaches (DispatchQueue, OperationQueue) to the modern Structured Concurrency model.
What the reader will learn
- Basics of async/await — how to declare and call asynchronous functions, handle errors.
- Task and TaskGroup — creating child tasks, managing priorities, canceling tasks.
- Actor — protecting shared data from races, state isolation.
- Structured Concurrency — principles of organizing asynchronous code with guaranteed completion.
- Integration with UIKit/SwiftUI — updating the UI from asynchronous contexts, using @MainActor.
- Migration from GCD and Combine — step-by-step recipes for replacing old patterns.
Strengths
The main advantage of the book is its practical focus. Each concept is supported by a ready-made project that can be downloaded and modified. The authors avoid excessive theory, focusing on real-world scenarios: loading data from the network, handling user input, parallel computations. The code is written cleanly and accompanied by comments. The chapters on debugging and profiling asynchronous code are particularly noteworthy — this is rarely found in other guides.
Who it is recommended for
The book will be useful for anyone who wants to master the modern asynchronous model in Swift and get rid of legacy approaches. I especially recommend it to teams migrating old projects to Swift 5.5+ — the step-by-step instructions will help avoid common mistakes. The book is also suitable for self-study: the material is structured, and there are self-test questions at the end of the chapters.
Recommendations
Rust and Docker: Containerizing Applications
Algorithms and Data Structures in JavaScript (Node.js)
DevOps for PHP Developers: Automation, CI/CD, and Cloud Solutions
Testing Go (Golang) Applications: From Unit Tests to Production
From Zero to Production in Rust
Testing TypeScript Applications with Jest