有没有一种方法可以打印出执行当前方法的当前线程id?
(请使用objective-c)
发布于 2009-10-24 10:13:18
NSLog(@"%@", [NSThread currentThread]);发布于 2013-03-20 20:06:08
#include <pthread.h>
...
mach_port_t machTID = pthread_mach_thread_np(pthread_self());
NSLog(@"current thread: %x", machTID);发布于 2016-12-04 23:28:03
Swift 5中的
print("Current thread \(Thread.current)")https://stackoverflow.com/questions/1616572
复制相似问题