OC:
// 打印当前线程
NSLog(@"%@", [NSThread currentThread]);
// 打印主线程
NSLog(@"%@", [NSThread mainThread]);
// 打印指定队列
dispatch_queue_t queue = dispatch_queue_create("test", DISPATCH_QUEUE_CONCURRENT);
NSLog(@"%@", queue);
Swift:
// 打印当前线程
print(Thread.current)
// 打印主线程
print(Thread.main)
// 打印指定队列
let gq = dispatch_queue_concurrent_t(label: "test")
print(gq)