Training

Introduction to Modern Swift Concurrency


This hands-on, two day introductory course is for experienced Swift developers who are new to the async / await framework.

Contact us at inquiries@dimsumthinking.com to book or inquire about this course for your group, company, conference, or public event.

What you'll learn


The async / await family includes syntax and APIs that combine to provide language level support for working with concurrency and asynchronous code.

You'll learn everything starting with when and how to use async, await, and Task. You'll use continuations to replace and wrap delegates and closure-based APIs. For multiple values over time, you'll meet AsyncSequence and AsyncStream. You'll write structured concurrency with async let and TaskGroups. We end protecting shared mutable state with actors.

What you need


You need a Mac running the latest version of Xcode. You'll create projects throughout the day.

Syllabus Highlights


Part I - Getting Started

Learning from Errors

Introducing Async, Await, and Task

The Main Actor

Writing Tests

What the Swift Concurrency Instrument tells us

Part II - Continuations

Replacing Delegates with Continuations

Throwing Continuations

Replacing Closure-Based APIs with Continuations

URLSession's dataTask() to data()

Part III - Streams and Sequences

NotificationCenter's Notifications

AsyncStreams

AsyncSequences

For Await In

Combine and Property Updates

Part IV - Structured Communication

AsyncLet

TaskGroups

Consuming TaskGroups

Actors

Communicating between Actors

Related Content


You will find much of this content and more in the book The Curious Case of the Async Cafe available from Editors Cut.