po [NSThread currentThread]
问题 When I do po [NSThread currentThread], I got {name = (null), num = 4} When I look to the left I see: Looks like it's Thread number 6, not 4. Also what properties do we need to call to get that thread numbers anyway? [NSThread currentThread].number? Doesn't exist though. 回答1: Thread numbers are meaningless, pretty much. The thread instance, though, is a singleton per thread. You could use the NSThread's address, by coincidence. Better, still, would be to dip down to the mach_* API and grab the