![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
GCD
极客猫
开始奋斗,就这样。
展开
-
iOS dispatch_semaphore_t
在GCD中有三个函数是semaphore的操作,分别是:创建一个semaphoredispatch_semaphore_create(int)发送一个信号dispatch_semaphore_signal(dispatch_semaphore)等待信号dispatch_semaphore_wait(dispatch_semaphore, int)注: (1)wait 将信号量 -1原创 2016-04-20 15:38:06 · 813 阅读 · 0 评论 -
iOS dispatch_group_t
创建groupdispatch_group_create();group异步执行dispatch_group_async(dispatch_group_t group, dispatch_queue_t queue, block);group执行完毕通知dispatch_group_notify(dispathc_group_t group, dispatch_queue_t queue, bloc原创 2016-06-28 17:34:48 · 792 阅读 · 0 评论 -
iOS dispatch_time_t
创建dispatch_time_tdispatch_time_t dispatch_time(dispatch_time_t when, int64_t delta);#define NSEC_PER_SEC 1000000000ull#define NSEC_PER_MSEC 1000000ull#define USEC_PER_SEC 1000000ull#define NSEC_PER_原创 2016-06-30 09:50:34 · 861 阅读 · 0 评论