Introduction to Async / Await in Swift (Part 3)
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 Three: Sequences and Streams: You’ll use techniques for delivering and consuming multiple values over time with AsyncSequence, AsyncStream, and for await in.