Code:
if ([NSThread isMainThread])
{
block();
}
else
{
dispatch_sync(dispatch_get_main_queue(), block);
}
Given that block() just doesn't do anything with GCD (eg, it doesn't dispatch any block).
Is there any chance that the above code snippet can cause a dead-lock ?
From my understanding it can't, but i just want it to be confirmed.