For years, writing powerful and safe concurrent apps with Swift could easily turn into a daunting task, full of race conditions and unexplained crashes hidden in a massive nesting of callback closures.
In Swift 5.5, Apple introduced a new concurrency model featuring the async/await syntax, to let you write asynchronous code that reads like synchronous code. But like any new feature, here be dragons! So how will you achieve the much-desired mastery of Modern Swift Concurrency?
Modern Concurrency in Swift is here for the rescue, showcasing everything you need to know about async/await, tasks, actors, and everything in between!
Before You Begin
This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.
Go into more detail about how the async/await syntax and the cooperative asynchronous execution work. Additionally, it introduces the usage of "async let" to design concurrent code and the "Task" type which encapsulates asynchronous execution in the modern concurrency model.
Develop an asynchronous testing infrastructure and learn all the ins-and-outs of testing asynchronous code in the new concurrency model. You'll wrap up by adding unit tests to the Blabber project you worked on in previous chapters.
Shai is the iOS Tech Lead @ Gett, the on-demand mobility company. On his spare time you can find him active on several...
Who is this book for
This book is for intermediate Swift developers who are familiar with writing asynchronous applications, but want to leverage the new concurrency features in Swift 5.5 to write safer and more predictable asynchronous apps.
Learn everything you need to create safe, performant and predictable asynchronous apps by leveraging the new modern concurrency features introduced in Swift 5.5, such as async/await, tasks, actors and more.