I have seen common idioms of dispatch_async calling into dispatch_async vs dispatch_async calling into dispatch_sync.
In some circumstances, the latter can be substituted with the former. Question is, in what situation can you only use one and not the other?
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
//
});
});
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_sync(dispatch_get_main_queue(), ^{
//
});
});