简体   繁体   中英

Does GCD main queue must have to be performed on the main thread?

I am just curious is there anyway to use a different thread rather than the main thread for the main queue?

Thanks,

The whole point of the main queue is to have it run on the main thread - the UI thread.

So no, there is no way to run the main queue on any other thread than the main thread.

Curious - why do you want the main queue on a different thread?

This doesn't so much apply on iOS, but on OS X if you're writing a program which is not an application and does not run the run loop of the main thread, you can have some other thread call dispatch_main() and that thread will host the main queue. There's rarely a need to do this.

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