我正在输出调试日志,我想知道我的代码中的特定方法是否在当前runloop中执行,而不是在后续执行中。有没有办法做到这一点?有没有办法知道你当前在使用哪个runloop或frame?
例如,在最简单意义上的运行循环:
int i = 0;
while (1) {
// process event queue
// here I want to print a number
// that signifies n-th time I am processing the run loop
NSLog(@"%d", i);
i++;
}
您是否想要从执行线程或不同线程中查询此信息? – 2013-02-21 19:19:13
让我详细说明我的问题。 – Boon 2013-02-22 02:19:25