I am running into a problem with a dispatch_async hanging. I would like to find out what operations/methods are in the queue when I add another operation to the queue so I can track down the place my queue is hanging.
dispatch_async(dispatch_get_main_queue(), ^{
// NSLog the items in the queue at this moment
[_delegate searchOperationFinished:self];
});
I verified the queue is working it run other operations but it never makes it to the end to run this method.
You can’t, as near as I know. Check the console output to see if something threw an exception. Even better, run it under the debugger and break on exceptions.
If that doesn’t reveal anything, stop it in the debugger and check the stack trace of the main thread. Presumably something is either blocked on the main thread or is running an internal run loop. Either way, the stack trace should reveal what. (Another way to get the stack trace, at least on Mac OS X, is to “sample” the process using something Activity Monitor or Instruments.)