As Apple's document says, dispatch_get_global_queue() is a concurrent queue, and dispatch_sync is something meaning serial.Then the tasks are processed async or sync?
2 Answers
You're getting confused between what a queue is and what async vs sync means.
A queue is an entity on which blocks can be run. These can be serial or concurrent. Serial means that if you put block on in the order A, B, C, D, then they will be executed A, then B, then C, then D. Concurrent means that these same blocks might be executed in a different order and possibly even more than one at the same time (assuming you have multiple cores on which to run, obviously).
Then onto async vs sync. Async means that when you call dispatch_async
, it will return immediately and the block will be queued on the queue. Sync means that when you call dispatch_sync
it will return only after the block has finished executing.
So to fully answer your question, if you dispatch_sync
onto a global concurrent queue then this block will be run, perhaps in parallel with other blocks on that queue, but in a synchronous manner - i.e. it won't return until the block is finished.

- 34,792
- 12
- 100
- 110
-
Thank you :-). There's definitely room for more explanation in it though, but this is a start and I'll answer any questions @keywind has. – mattjgalloway Mar 22 '12 at 13:18
-
Another thing to know here is that sync/async dispatch is conceptually orthogonal to serial/concurrent queues. Only the enqueueing thread cares about sync/async (because that determines whether execution on the enqueueing thread resumes immediately, or after the block has executed). The enqueued block itself is totally unaware of whether it was submitted sync or async. – ipmcc Oct 07 '13 at 12:41
Apple Doc says
dispatch_get_global_queue
Returns a well-known global concurrent queue of a given priority level.
dispatch_queue_t dispatch_get_global_queue( long priority, unsigned long flags);
Parameters
priority The priority of the queue being retrieved. For a list of possible values, see “dispatch_queue_priority_t”. flags This value is reserved for future use. You should always pass 0. Return Value Returns the requested global queue.
Discussion
The well-known global concurrent queues cannot be modified. Calls to dispatch_suspend, dispatch_resume, dispatch_set_context, and the like have no effect when used with queues returned by this function.
Blocks submitted to these global concurrent queues may be executed concurrently with respect to each other.
Availability Available in iOS 4.0 and later. Declared In dispatch/queue.h
In the Discussion they have said that-> 'blocks submitted MAY be executed concurrently wrt each other.'
So Tasks may be processed Async with each other.

- 3,230
- 2
- 23
- 39