Apple's GCD documentation states the following:
GCD provides and manages FIFO queues to which your application can submit tasks in the form of block objects. Blocks submitted to dispatch queues are executed on a pool of threads fully managed by the system. No guarantee is made as to the thread on which a task executes. GCD offers three kinds of queues:
Does this mean that even if I issue a request such as
dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{...});
it could result in the block of code to be executed on the main thread? In that case, it seems that calling dispatch_sync with a concurrent queue on main thread can result in a deadlock situation in which the main thread is stuck waiting for itself.
Is my interpretation of the GCD documentation correct?