the apple document says:(concurrencyProgrammingGuide,page49) Important: You should never call the dispatch_sync or dispatch_sync_f function from a task that is executing in the same queue that you are planning to pass to the function. This is particularly important for serial queues, which are guaranteed to deadlock, but should also be avoided for concurrent queues.the apple document says:(concurrencyProgramming