Reputation: 26223
My understanding is that // 001
gets a high priority concurrent queue
// 001
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
and that // 002
creates a new custom serial queue
// 002
dispatch_queue_t queue = dispatch_queue_create("bgQueue", NULL);
My question, is there a chance that other processes (on the iPhone, other apps etc.) will be queued on the global queues so you may have to wait (albeit briefly) to execute. If this is the case would it be best to always create custom queues where you know you have sole access?
Upvotes: 5
Views: 1059
Reputation: 726479
001
gets the high-priority queue, not creates it. The three global queues are automatically created for your application; they are always available.DISPATCH_QUEUE_CONCURRENT
(thanks, Rob, for the correction).Upvotes: 9