O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

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

Object-Oriented Design

Grand Central Dispatch is an object-oriented library, even though it is implemented purely in C. The fundamental GCD types are pointers to opaque data structures, but there is an inheritance model involved. The base class for dispatch objects is dispatch_object_t. You never directly create one of these; instead, you create concrete objects such as queues, sources, or groups. There are a couple of types, such as dispatch_once_t and dispatch_time_t. These are not objects but semi-opaque scalar types, as shown in Figure 22.5

Figure 22.5  Dispatch classes and functions

Dispatch classes and functions

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