//同步操作用途
dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
dispatch_sync(queue, ^{
NSLog(@"登录");
});
dispatch_async(queue, ^{
NSLog(@"下载小说A");
});
dispatch_async(queue, ^{
NSLog(@"下载小说B");
});
//同步操作用途
dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
dispatch_sync(queue, ^{
NSLog(@"登录");
});
dispatch_async(queue, ^{
NSLog(@"下载小说A");
});
dispatch_async(queue, ^{
NSLog(@"下载小说B");
});