摘要: 原文连接介绍:Grand Central Dispatch 简称(GCD)是苹果公司开发的技术,以优化的应用程序支持多核心处理器和其他的对称多处理系统的系统。这建立在任务并行执行的线程池模式的基础上的。它首次发布在Mac OS X 10.6 ,iOS 4及以上也可用。设计:GCD的工作原理是:让程序平行排队的特定任务,根据可用的处理资源,安排他们在任何可用的处理器核心上执行任务。一个任务可以是一个函数(function)或者是一个block。GCD的底层依然是用线程实现,不过这样可以让程序员不用关注实现的细节。GCD中的FIFO队列称为dispatch queue,它可以保证先进来的任务先得到 阅读全文
posted @ 2014-02-21 10:51 codeartistry 阅读(123) 评论(0) 推荐(0) 编辑
摘要: A Short Practical Guide to Blocks原文地址:https://developer.apple.com/library/ios/featuredarticles/Short_Practical_Guide_Blocks/index.htmlBlocks are a powerful C-language feature that is part of Cocoa application development. They are similar to “closures” and “lambdas” you may find in scripting and pro 阅读全文
posted @ 2014-02-21 10:36 codeartistry 阅读(226) 评论(0) 推荐(0) 编辑