【发布时间】:2011-11-20 08:33:44
【问题描述】:
当我执行 po [NSThread currentThread] 时,我得到了
{name = (null), num = 4}
当我向左看时,我看到:
看起来是 6 号线程,而不是 4 号。另外,我们还需要调用哪些属性来获取该线程号?
[NSThread currentThread].number?不过不存在。
【问题讨论】:
-
我发现
(lldb) thread info更有用。您可以使用tid将 Console.app / NSLog 的输出连接回线程。thread #9: tid = 0x2e77, 0x0000000105293c9c
标签: objective-c xcode nsthread