简体   繁体   中英

GCD concurrent queue with operations of same priority?

I know that GCD has serial and concurrent queues.

I also aware of the fact that serial queues execute in FIFO manner, and that concurrent queues according to priority and availability of threads.

I am not able to find any description of what's happening in concurrent queues with operations of same priority.

Do they execute in FIFO manner as every operation has the same priority?

Can anybody help me in finding out this?

From the GCD reference :

Concurrent: tasks are dequeued in FIFO order, but run concurrently and can finish in any order.

So tasks submitted to a particular queue will be dequeued in FIFO order. Tasks submitted to a GCD queue do not have a priority relative to one another, only the queue has a quality of service (QoS) value.

If you are asking about tasks submitted to different queues where the queues have the same QoS value, then the order of execution is not defined beyond tasks being executed in FIFO order within their own queue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM