标签:
dispatch_queue_t queue = dispatch_queue_create(
"tk.bourne.testQueue"
, NULL);
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
//
提交到这个队列的任务会在high优先级的任务和已经提交到background队列的执行完后执行。
dispatch_sync(, ^{
//code here
NSLog(@
"%@"
, [NSThread currentThread]);
});
dispatch_async(, ^{
//code here
NSLog(@
"%@"
, [NSThread currentThread]);
});
标签:
原文地址:http://www.cnblogs.com/10-19-92/p/5311563.html