Diploma in Apple Development 🍎👩🏻‍💻: Coding One: Lecture 9: Concurrency
Back to slide index.
👋🏻 Hi!
First, don't forget to confirm your attendance using the Seats Mobile app!
Second, I'm going to start every lecture with a meditation from the fantastic Sitting Still Like a Frog book, all read by Myla Kabat-Zinn. If you don't want to participate that's completely fine.
Let's watch a WWDC video:
"Meet async/await in Swift" (34 mins)
"Swift now supports asynchronous functions — a pattern commonly known as async/await. Discover how the new syntax can make your code easier to read and understand. Learn what happens when a function suspends, and find out how to adapt existing completion handlers to asynchronous functions."
Let's watch another WWDC video:
"Explore structured concurrency in Swift" (28 mins)
"When you have code that needs to run at the same time as other code, it's important to choose the right tool for the job. We'll take you through the different kinds of concurrent tasks you can create in Swift, show you how to create groups of tasks, and find out how to cancel tasks in progress. We'll also provide guidance on when you may want to use unstructured tasks."
Let's watch one more WWDC video:
"Visualise and Optimize Swift Concurrency" (25 mins)
"Learn how you can optimize your app with the Swift Concurrency template in Instruments. We'll discuss common performance issues and show you how to use Instruments to find and resolve these problems. Learn how you can keep your UI responsive, maximize parallel performance, and analyze Swift concurrency activity within your app. To get the most out of this session, we recommend familiarity with Swift concurrency (including tasks and actors)."
Let's finish by looking at what the Swift Book says about Concurrency.
Homework:
  1. Review today's content.
  2. Slack me with any problems or queries. See you on Friday for the next Spatial lecture, the next ML lecture is first, on Thursday from 0930.
Thanks!
Back to slide index.