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

For the More Curious: The dispatch_debug() Function

Dispatch objects provide one more function we have yet to discuss. The dispatch_debug function logs debugging information about any dispatch object:

void dispatch_debug (dispatch_object_t object,
                     const char *message, ...);

In the released version of the library, dispatch_debug() logs to the system log rather than to the console.

The logged information is intended to assist developers of the libdispatch library and is only marginally useful to users of Grand Central Dispatch. For example, here is the output generated for several different kinds of dispatch objects:

c​o​m​.​b​i​g​n​e​r​d​r​a​n​c​h​.​d​i​s​p​a​t​c​h​_​d​e​b​u​g​:​ ​ ​ ​ ​ ​c​o​m​.​a​p​p​l​e​.​r​o​o​t​.​d​e​f​a​u​l​t​-​p​r​i​o​r​i​t​y​[​0​x​7​f​f​f​7​1​0​0​1​a​f​0​]​ ...

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