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)