GCD (libdispatch) is a technology that Apple introduced with OS X Snow Leopard and iOS 4.0; we’ve had access to it on iOS for over a year now (and Mac OS X for 2 years!). Most of the marketing we all heard about was better thread efficiency, better use of multiple cores and blah blah blah who cares? Yes, these things are great, and they will make a difference to how well your code runs. But if I’m honest, the part of GCD that really makes a difference to me, is just how much easier it makes my life as a programmer. I constantly find myself finishing up some threaded programming with libdispatch, and thinking: concurrency just shouldn’t be this easy.
The aim of this post is to demonstrate this fact to you, teach you how to use libdispatch, and possibly garner addresses for threatening letters should you not start using it immediately.
(more…)