Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4620582
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:34:48+00:00 2026-05-22T02:34:48+00:00

I am struggling with a deadlock in my GCD code. Then I saw this

  • 0

I am struggling with a deadlock in my GCD code. Then I saw this function dispatch_debug in the header file <dispatch/object.h>.

/*!
 * @function dispatch_debug
 *
 * @abstract
 * Programmatically log debug information about a dispatch object.
 *
 * @param object
 * The object to introspect.
 *
 * @param message
 * The message to log above and beyond the introspection.
 */
__OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0)
DISPATCH_EXPORT DISPATCH_NONNULL2 DISPATCH_NOTHROW __attribute__((__format__(printf,2,3)))
void
dispatch_debug(dispatch_object_t object, const char *message, ...);

But I am not able to make it do anything. I was hoping it would print out the state and locks or something like that.

Here is how I use it:

grabber_queue = dispatch_queue_create("com.unpaq.tvguideplus.grabber", NULL);
dispatch_debug(grabber_queue, "grabber queue");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:34:49+00:00Added an answer on May 22, 2026 at 2:34 am
    • Grand Central Dispatch (GCD) Reference

    dispatch_debug

    Debug information is logged to the Console log. This information can be useful as a debugging tool to view the internal state (current reference count, suspension count, etc.) of a dispatch object at the time the dispatch_debug function is called.

    dispatch_debug sends messages to syslog. So,

    grabber_queue = dispatch_queue_create("com.unpaq.tvguideplus.grabber", NULL);
    dispatch_debug(grabber_queue, "grabber queue");
    

    this code would print as the following in system.log.

    May 13 08:50:17 hostname exefile[53164]: com.unpaq.tvguideplus.grabber[0x6200e10] = {
     xrefcnt = 0x1, refcnt = 0x1, suspend_cnt = 0x0, locked = 0, target =
     com.apple.root.default-overcommit-priority[0x1af0700], width = 0x0, running = 0x0,
     barrier = 0 }: grabber queueMay
    

    It doesn’t appear in Xcode debug console. You can see in /Applications/Utilities/Console.app system.log on the iPhone simulator, or in Xcode organizer on iPhone, iPod touch and iPad.

    By the way, GCD is open source. It is distributed via libdispatch. dispatch_debug is included in src/object.c.

    • src/object.c – dispatch_debug
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Struggling with this tournament fixtures algorithm. The code is working perfectly but I need
still struggling with regex :) i have this code: $link = '/\bhttp:\/\/.+\..+[\/\w]?\b/i'; $match =
Really struggling to work this out... I have a text file with data like
Been struggling with this simple selector problem a couple of hours now and must
im struggling with syntax here: hopefully this question is v simple, im just miising
I'm struggling to find the right terminology here, but if you have jQuery object...
A coworker has been struggling with this problem. The desired result is an installable
Struggling with this one. I have set up a basic email/enquiry form for a
Struggling with this problem for an hour now and searched both stackoverflow and google
Struggling with onchange for JQuery Datetime plugin: http://plugins.jquery.com/project/datetime I am using the following code.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.