Because I am a programmer from Android to iOS. I am quite familiar with Handler Looper MessageQueue etc. in Android. But I am a little confused with iOS when I find a code block [NSURLConnection start]
called in main thread. Luckily I read NSDefaultRunLoopMode vs NSRunLoopCommonModes and Does NSURLConnection block the main thread?. I learned network communication can go on in main thread for iOS with the help of modes
concept.
Now I have a another question. As we know UITracking mode have a high priority, but if the current moment is doing network job in default mode, then UI event happens and network job is not finished, the corresponding code or method execution is not over, how the execution state be processed, saved and restored for OS and how the modes switch well?
And using NSURLConnection asynchronously actually does create another thread, an internal one or not ?
Thanks!