Wrap up
Wrap up 관련
Although I've tried to simplify things as much as possible, GCD still isn't easy. That said, it's much easier than the alternatives: GCD automatically handles thread creation and management, automatically balances based on available system resources, and automatically factors in Quality of Service to ensure your code runs as efficiently as possible. The alternative is doing all that yourself!
There's a lot more we could cover (not least how to create your own queues!) but really you have more than enough to be going on with, and certainly more than enough to complete the rest of this series. We'll be using GCD again, so it might help to keep this reference close to hand!
Review what you learned
Anyone can sit through a tutorial, but it takes actual work to remember what was taught. It’s my job to make sure you take as much from these tutorials as possible, so I’ve prepared a short review to help you check your learning.
Challenge
One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try your new knowledge to make sure you fully understand what’s going on:
- Modify project 1 so that loading the list of NSSL images from our bundle happens in the background. Make sure you call
reloadData()
on the table view once loading has finished! - Modify project 8 so that loading and parsing a level takes place in the background. Once you’re done, make sure you update the UI on the main thread!
- Modify project 7 so that your filtering code takes place in the background. This filtering code was added in one of the challenges for the project, so hopefully you didn’t skip it!