# RunLoop.main or DispatchQueue.main when using Combine scheduler?

**URL:** <https://forums.swift.org/t/runloop-main-or-dispatchqueue-main-when-using-combine-scheduler/26635>\
**Category:** Using Swift\
**Tags:** combine\
**Created:** [July 5, 2019, 2:06am UTC](https://forums.swift.org/t/runloop-main-or-dispatchqueue-main-when-using-combine-scheduler/26635 "2019-07-05T02:06:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Philippe\_Hausler](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/philippe_hausler/32/22569_2.png) [@Philippe\_Hausler](https://forums.swift.org/u/Philippe_Hausler)\
**Post date:** [July 5, 2019, 8:55pm UTC](https://forums.swift.org/t/runloop-main-or-dispatchqueue-main-when-using-combine-scheduler/26635/2 "2019-07-05T20:55:21Z")

</div>

`RunLoop.main` as a Scheduler ends up calling `RunLoop.main.perform` whereas `DispatchQueue.main` calls `DispatchQueue.main.async` to do work, for practical purposes they are nearly isomorphic. The only real differential is that the `RunLoop` call ends up being executed in a different spot in the `RunLoop` callouts whereas the `DispatchQueue` variant will perhaps execute immediately if optimizations in libdispatch kick in. In reality you should never really see a difference tween the two.

---

_[View the full topic](https://forums.swift.org/t/runloop-main-or-dispatchqueue-main-when-using-combine-scheduler/26635)._
