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

**URL:** <https://forums.kodeco.com/t/there-is-no-guarantee-as-to-which-thread-your-task-will-execute-against/161400>\
**Category:** Concurrency by Tutorials\
**Created:** [December 29, 2021, 6:14pm UTC](https://forums.kodeco.com/t/there-is-no-guarantee-as-to-which-thread-your-task-will-execute-against/161400 "2021-12-29T18:14:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brower](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/brower/32/102075_2.png) [@brower](https://forums.kodeco.com/u/brower)\
**Post date:** [December 29, 2021, 6:14pm UTC](https://forums.kodeco.com/t/there-is-no-guarantee-as-to-which-thread-your-task-will-execute-against/161400/1 "2021-12-29T18:14:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gargoyle](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gargoyle/32/107285_2.png) [@gargoyle](https://forums.kodeco.com/u/gargoyle)\
**Post date:** [December 29, 2021, 11:42pm UTC](https://forums.kodeco.com/t/there-is-no-guarantee-as-to-which-thread-your-task-will-execute-against/161400/2 "2021-12-29T23:42:59Z")

</div>

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.
