Effective Objective-C 2.0: 52 Specific Ways to Improve Your iOS and OS X Programs
by Matt Galloway
6. Blocks and Grand Central Dispatch
Multithreaded programming is something that every developer is going to need to think about with modern application development. Even if you don’t think that your application is multithreaded, it most probably is because system frameworks often use extra threads to get work done off the UI thread. There’s nothing worse than an application that hangs because the UI thread is blocked. In Mac OS X, this results in the dreaded spinning beach ball; in iOS, your application may be terminated if it blocks for too long.
Fortunately, Apple has thought about multithreading in a whole new way. The core features of modern multithreading are blocks and Grand Central Dispatch (GCD). Although distinct and separate technologies, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access