//异步下载 同步加载
dispatch_group_t group = dispatch_group_create();
dispatch_queue_t queue = dispatch_queue_create("hxy.test", DISPATCH_QUEUE_CONCURRENT);
dispatch_group_async(group, queue, ^{
NSLog(@"queue1");
});
dispatch_group_async(group, queue, ^{
NSLog(@"queue2");
});
dispatch_group_async(group, queue, ^{
NSLog(@"queue3");
});
dispatch_group_notify(group, queue, ^{
NSLog(@"全部下载完成了");
});
网友评论