Modern Concurrency: Getting Started

Oct 18 2022 · Swift 5.5, iOS 15, Xcode 13.4

Part 2: Asynchronous Sequences

08. Introduction

Episode complete

Play next episode

About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: Part 1 Quiz: Asynchronous Code Next episode: 09. Your Second Asynchronous App

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

Welcome back to our course, Modern Concurrency. In part one, you've learned some basic ways to integrate asynchronous code into your apps. You're getting comfortable calling and writing async functions and iterating over asynchronous sequences. In part two, you'll implement SuperStorage, a cloud file storage app with three download plans. Silver just downloads the file. Gold downloads the file in chunks and displays download progress. And Cloud 9 downloads the file in four concurrent tasks. SuperStorage uses async/await and AsyncSequence. You'll also learn the async let syntax for grouping asynchronous tasks so they run at the same time. You'll use the top level asynchronous task to call an asynchronous method from the Swift UI view. And you'll learn a different way to run code on @MainActor. You'll get more practice canceling tasks including a task hierarchy with child tasks. You'll use a download stream iterator to process partial downloads. And a local task property to display partial JPEG files. You'll even integrate a combine timer publisher into your app to show the download duration. A combine publisher can asynchronously emit zero, one, or more values. It can optionally complete with a success or a failure just like an AsyncSequence, let's get to work.