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​]​ ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.