摘要: 一:创建一个任务队列对象 NSOperationQueue *opretionQueue = [[NSOperationQueue alloc] init]; //设置最大并发任务数量 [opretionQueue setMaxConcurrentOperationCount:5]; 二:三个实现方 阅读全文
posted @ 2016-07-14 14:40 ai_诺诺 阅读(271) 评论(0) 推荐(0)
摘要: Thread :是三种方法里面相对轻量级的,但需要管理线程的生命周期、同步、加锁问题,这会导致一定的性能开销 一:创建线程 方法1: // 初始化线程 NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selecto 阅读全文
posted @ 2016-07-14 14:13 ai_诺诺 阅读(143) 评论(0) 推荐(0)