dispatch_group_t group = dispatch_group_create();
dispatch_group_async(group, dispatch_get_global_queue(0, 0), ^{
NSLog(@"------CCCCCCCCC-------");
});
dispatch_group_async(group, dispatch_get_global_queue(0, 0), ^{
NSLog(@"------BBBBBBB-------");
});
dispatch_group_async(group, dispatch_get_global_queue(0, 0), ^{
NSLog(@"------AAAAAA-------");
});
dispatch_group_notify(group, dispatch_get_global_queue(0, 0), ^{
NSLog(@"执行结束。。。。。。。");
});
2019-02-22 00:51:29.359991+0800 下载图片[6738:214051] ------BBBBBBB-------
2019-02-22 00:51:29.359902+0800 下载图片[6738:214049] ------CCCCCCCCC-------
2019-02-22 00:51:29.360021+0800 下载图片[6738:214050] ------AAAAAA-------
2019-02-22 00:51:29.360508+0800 下载图片[6738:214051] 执行结束。。。。。。。