Pranav Jaiswal Pranav Jaiswal - 10 months ago 71
iOS Question

Set priority for custom created serial asynchronous queue

How can I set high priority to a custom created serial asynchronous queue using GCD's?

I had a look at this Q&A where suggestion is made to make use of

& Pass High Priority Queue (
) which is a Concurrent Queue to custom serial asynchronous queue.

My understanding is that this will make all the tasks on the Serial Queue Concurrent. Is my understanding correct? If so, what is an alternate solution?

Answer Source

Your queue will still be serial. It will just be performing its tasks, one at a time, in one slot of the high priority, global, concurrent background queue. Once created, a serial queue cannot be "made concurrent" by any means.

Similarly, if you create a concurrent queue and you set it to target a serial queue, it effectively becomes serial.

This is all covered in this man page.