Sending a block synchronously to the current current queue leads to an immediate deadlock. You can easily verify by executing the following code in the main thread / queue:
NSLog(@"before");
dispatch_sync(dispatch_get_main_queue(), ^{
NSLog(@"in block");
});
NSLog(@"after");
, ,
, if ([NSThread isMainThread]). ( , " " " " .)
, dispatch_async().