3 ms·
Depends on what you call "main thread" - maybe he's saying worker thread that's doing the "main code" shouldn't be doing GUI
by moonchrome 11y ago
Depends on what you call "main thread" - maybe he's saying worker thread that's doing the "main code" shouldn't be doing GUI
- cellularmitosis 11y agoIn other languages / frameworks, "main thread" may have flexible semantics, but in the land of iOS, UIKit defines the term "main thread" to have one specific meaning.
- tomc1985 11y agoSo... GUI work goes on its own thread, however that works out
- eridius 11y agoNope, the term "main thread" is very explicitly defined by both iOS and OS X. Not only in all the frameworks (e.g. NSThread, NSRunLoop, etc. all explicitly define "main thread"), but even at the system level. OS X and iOS have a pthread function `int pthread_main_np(void);` that returns non-zero if the current thread is the main thread (meaning the initial thread that the application was launched with), and that is the thread that all UIKit (iOS UI) and AppKit (OS X UI) code must be running on.