GCD对象方法

Queues 

dispatch_queue_ t

dispatch_queue_create 

用于创建用户线程队列。可以创建Serial/Concurrent Dispatch Queue 两种队列,即串行与并行队列。

dispatch_queue_t serialQueue =dispatch_queue_create(“com.SerialQueue”, NULL);

dispatch_queue_get_label 获取当前队列的名字

dispatch_get_main_queue 获取主线程

dispatch_get_global_queue 获取全局队列

dispatch_get_current_queue 获取当前队列

dispatch_main

dispatch_async  开启一个异步操作,第一个参数是指定一个gcd队列,第二个参数是分配一个处理事物的程序块到该队列

dispatch_async_f

dispatch_sync 同步

dispatch_sync_f

dispatch_after 延时

dispatch_after_f

dispatch_apply将指定次数的block添加到queue中

dispatch_apply_f



objects

dispatch_object_t

dispatch_retain

dispatch_release

dispatch_suspend // 挂起

dispatch_resume // 启动

dispatch_debug

dispatch_set_context //程序上下文

dispatch_get_context

dispatch_set_finalizer_f

dispatch_set_target_queue


Sources

dispatch_source_t

dispatch_source_create

dispatch_source_cancel

dispatch_source_testcancel

dispatch_source_merge_data

dispatch_source_get_handel

dispatch_source_get_mask

dispatch_source_get_data

dispatch_source_set_timer

dispatch_source_set_event_handler

dispatch_source_set_event_handler_f

dispatch_source_set_cancel_handler

dispatch_source_set_cancel_handler_f


Semaphores

dispatch_semaphore_create

dispatch_semaphore_signal

dispartch_semaphore_wait


Groups

dispatch_group_create

dispatch_group_enter

dispatch_group_leave

dispatch_group_wait

dispatch_group_notify

dispatch_group_notify_f

dispatch_group_async

dispatch_group_async_f


Time

dispatch_time

dispatch_walltime

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值