O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Grand Central Dispatch

Just like our hypothetical robot has lists of tasks to do with its hands, tasks to do with its voice, and so on, iOS has “lists” of tasks to be performed. They’re called queues, as part of a work-dispatching system called Grand Central Dispatch, or GCD. The idea of GCD is that there are multiple queues of work, each with tasks to execute. The tasks are C function calls, Objective-C blocks, or Swift closures. GCD can determine which tasks to execute based on the priority of the queue, whether the tasks are suitable for concurrent execution, how busy the CPU cores are, and other considerations.

Developers from other platforms will see an analogy to threading, and the queues are indeed performed by threads, but the difference ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required