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