There is no guarantee as to which thread your task will execute against

At 2.GCD vs. Operations, under Grand Central Dispatch, there is a box that says in it:

“Note: There is no guarantee as to which thread your task will execute against.”

On the other hand, on Apple’s Developer Documentation → Dispatch- > DispatchQueue, it says under Overview:

“Except for the dispatch queue representing your app’s main thread, the system makes no guarantees about which thread it uses to execute a task.”

Does that exception apply to the Note in the book I quoted above?

Hi, @brower. The two areas are saying the same thing. Essentially, if you’re talking about the main queue, you are guaranteed that it will always execute on the main thread, as that’s where all your UI updates must happen. For all other queues, it’s up to the os which thread it runs on.