In Chapter 9, Syncing Data with CloudKit, you had an encounter with asynchronous code and multithreading. That chapter didn't go into much detail regarding multithreading and asynchronous code because the subject of threading is rather complex, and it's much more suited to a thorough discussion, which we're explore in this chapter.
If you're unclear on what has already been explained, feel free to go back to Chapter 9, Syncing Data with CloudKit, to review the information presented there. The biggest takeaway from that chapter is that data fetching is performed on a background thread to avoid blocking the main thread. Once a fetch request is done, a callback function is executed, which allows you to use the main thread to update the user interface.