[ad_1]
Can anybody please clarify the distinction between a dispatch queue and a completion block? For instance, there’s such a dispatch queue as:
dispatch_queue_t concurQ = dispatch_get_global_queue(DISPTACH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(concurQ, ^{
dispatch_sync(concurQ, ^{
[someObject someHeavyTask];
});
dispatch_sync(dispatch_get_main_queue(), ^{
// run another process
});
});
And there’s such a way name:
dispatch_async(dispatch_get_global_queue(), ^{
[someObject someHeavyTask completion: ^{
// run some other task
}];
});
Is there any distinction between these two mechanisms? Thanks.
[ad_2]
