相关疑难解决方法(0)

dispatch_debug应该如何使用?

我正在努力解决我的GCD代码中的死锁问题.然后我dispatch_debug在头文件中看到了这个函数<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, ...);
Run Code Online (Sandbox Code Playgroud)

但我无法做任何事情.我希望它会打印出状态并锁定或类似的东西.

这是我如何使用它:

grabber_queue = dispatch_queue_create("com.unpaq.tvguideplus.grabber", NULL);
dispatch_debug(grabber_queue, "grabber queue");
Run Code Online (Sandbox Code Playgroud)

iphone debugging multithreading grand-central-dispatch

1
推荐指数
1
解决办法
1877
查看次数