
获得徽章 6
- // GCD开线程的最大数量:for (int i = 0; i<1000; i++) {
const char *label = [NSString stringWithFormat:@"label-:%d", i].UTF8String;
dispatch_queue_t queue = dispatch_queue_create(label, DISPATCH_QUEUE_SERIAL);
dispatch_async(queue, ^{
NSLog(@"打印当前线程%@" , [NSThread currentThread]);
});
}
// 感谢星仔的帮助;展开赞过评论2