Understanding Concurrency in Swift
As we continue to learn more about Swift, eventually we will begin to build complex projects. With that complexity comes a lot more code for our apps to think through and execute. Over time, this could mean that our apps begin to feel weighty, slow, and unresponsive at runtime. Concurrency in Swift allows us to increase the performance and responsiveness of our code by allowing different tasks to be run seemingly at the same time, when possible.
In this chapter, we will learn how we can perform asynchronous tasks using Grand Central Dispatch (GCD) through the Dispatch framework and the higher-level operations in the Foundation framework that are also built on GCD. We will also take a look at the more current Async/Await framework, which brings a more modern approach, look, and feel to concurrency in Swift.
By the end of this chapter, you will know how to unlock the performance potential of your apps through concurrency. Understanding the multithreaded...