摘要: 简介GCD本身是苹果公司为多核的并行运算提出的解决方案。GCD在工作时会自动利用更多的处理器核心,以充分利用更强大的机器。GCD是Grand Central Dispatch的简称,它是基于C语言的。如果使用GCD,完全由系统管理线程,我们不需要编写线程代码。只需定义想要执行的任务,然后添加到适当的 阅读全文
posted @ 2017-08-12 19:02 LiLM 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 创建并启动 先创建线程,再启动 // 创建 NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run:) object:nil]; // 启动 [thread start]; 创建并启动 [NSTh 阅读全文
posted @ 2017-08-12 14:23 LiLM 阅读(308) 评论(0) 推荐(0) 编辑