Introduction to Async / Await in Swift (Part 2)

This two day workshop will introduce you to the basics of the Async / Await family in Swift. We begin with a look at the syntax before digging in to better understand Task, the main actor, and when and how to use the async and await keywords in Swift. We’ll use continuations to wrap and replace your delegate and closure-based code and see how Apple has done this with URLSession. We’ll move on to AsyncSequence and AsyncStream and see how it simplifies existing code. We work with familiar operators such as map() and filter() and note the differences between using them with AsyncSequence and using them with Sequence. Again, we see how Apple has done this with NotificationCenter and also investigate async algorithms. As much as we benefit from creating and using asynchronous APIs, we can often benefit further by working with structured concurrency. We’ll accomplish this with async let and group tasks. We finish the course with a look at actors.

The course is designed as a two day introduction to modern Swift Concurrency. If for some reason you prefer or are only able to take one day of the course, the material is split into four parts. Parts one and two will be covered on the first day and parts three and four on the second day.

Part Two: Checked Continuations. We will replace and wrap Delegate based and closure-based APIs with async methods using CheckedContinuations

Share

Session info:

Speaker: Daniel Steinberg

Storyteller at Dim Sum Thinking at Dim Sum Thinking

Date: 9 May 2023

Time: 13:30 - 17:00

Relevant tags:
iOS Swift

See all speakers

See all videos