BLACK FRIDAY: Save 50% on all my Swift books and bundles! >>

understanding global queues

Forums > Swift

I have read that there is one global queue (provided by the system rather than created by you) for each of the supported quality of service (QoS) values. That implies there are six since the QoS values are userInteractive, userInitiated, default, utility, background, and unspecified. I see that each queue is either serial or concurrent. I also read that there are four global concurrent queues ... default, high, low, and background and that serial queues must be explictly created. So it seems not all of these sources are correct.

I think getting answers to these questions would clear everything up.

  • Is the userInitiated queue the same as the main queue?
  • Is the main queue serial or concurrent?
  • Which QoS corresponds to "high"?
  • Which QoS corresponds to "low"?
  • Is the userInitiated queue serial or concurrent?
  • Is the unspecified queue serial or concurrent?

2      

im also quite interested in multithreading, waiting for someone to clear it up for both of us

2      

This seems like it should answer your questions: Ultimate Grand Central Dispatch tutorial in Swift - The.Swift.Dev., specifically the section on dispatch queues.

2      

@roosterboy Thanks so much for the article link! That did answer all of my questions which I will summarize below. It's an excellent article, but readers should bear in mind that it predates the async/await system, so some things it describes might be considered the old way of doing things. But I believe the queue descriptions in the article are accurate and that's what I was after.

Is the userInitiated queue the same as the main queue? No, it is the same as the "high" global queue

Is the main queue serial or concurrent? It is a serial queue.

Which QoS corresponds to "high"? userInitiated

Which QoS corresponds to "low"? utility

Is the userInitiated queue serial or concurrent? It is concurrent.

Is the unspecified queue serial or concurrent? It is concurrent.

2      

Save 50% in my WWDC sale.

SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.