随笔分类 -  objc

摘要:GCD is a C APIThe basic idea is that you have queues of operationsThe operations are specified using blocks.Most queues run their operations serially (a true “queue”).We’re only going to talk about serial queues today.The system runs operations from queues in separate threadsThough there is no guara 阅读全文
posted @ 2012-01-31 18:00 rickxu 阅读(1511) 评论(0) 推荐(0)
摘要:Creating a “type” for a variable that can hold a blockBlocks are kind of like “objects” with an unusual syntax for declaring variables that hold them.Usually if we are going to store a block in a variable, we typedef a type for that variable, e.g.,typedef double (^unary_operation_t)(double op);This 阅读全文
posted @ 2012-01-31 14:22 rickxu 阅读(638) 评论(0) 推荐(0)