Leave a rating/review
Welcome back to our course Modern Concurrency: Getting Started.
In Part 1, 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 2, you’ll implement SuperStorage, a cloud file storage app with three download plans:
-
SuperStorage also uses
async/awaitandAsyncSequence -
You also learn the
async letsyntax for grouping asynchronous tasks so they run at the same time. -
You’ll use the top-level asynchronous
Taskto call an asynchronous method from a SwiftUI view. -
You’ll learn a different way to run code on
MainActor:@MainActor func addDownload(name: String) { ... }
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. 010-task-local-storage.png
You’ll even integrate a Combine Timer publisher into your app, to show the download duration. 014-timer.png
A Combine publisher can asynchronously emit zero, one or more values. It can, optionally, complete with a success or a failure, just like an async sequence.
Let’s get to work!