Grand Central Dispatch. A better way to do multicore.

Grand Central Dispatch (GCD) is a revolutionary approach to multicore computing that is woven throughout the fabric of Snow Leopard. GCD combines an easy-to-use programming model with highly-efficient system services to radically simplify the code needed make best use of multiple processors. The technologies in GCD improve the performance, efficiency, and responsiveness of Snow Leopard out of the box, and will deliver even greater benefits as more developers adopt them.

Write Less Code, Get More Done

Write Less Code, Get More Done

The key innovation of GCD is shifting the responsibility for managing threads and their execution from applications to the operating system. As a result, programmers can write less code to deal with concurrent operations in their applications, and the system can perform more efficiently on single-processor machines, large multiprocessor servers, and everything in between. Without a pervasive approach such as GCD, even the best-written application cannot deliver the best possible performance, because it doesn’t have full insight into everything else happening in the system.

A Finely-tuned Engine

Grand Central Dispatch is extremely efficient at what it does. It dynamically scales the workload of an application to account for the number of processors in the computer. And it makes applications more efficient by using only the number of threads required for the work being done. For example, without GCD, if an application needs 20 threads when at maximum capacity, it might set up 20 threads and consume the associated resources even when it has nothing to do. GCD, by contrast, frees resources when it’s not using them, helping to keep the whole system more responsive.

Let the Operating System Do It for You

GCD is implemented as a set of extensions to the C language as well as a new API and runtime engine. While initially inspired by the challenge of multicore computing, these actually solve a more general problem: how to efficiently schedule multiple independent chunks of work.

Read the GCD Technology Brief GCD Brief

With GCD, threads are handled by the operating system, not by individual applications. GCD-enabled programs can automatically distribute their work across all available cores, resulting in the best possible performance whether they’re running on a dual-core Mac mini, an 8-core Mac Pro, or anything in between.