1. "Power-saving, smooth, high-quality application, fast response, good user experience ..." may be the apple system in the eyes of many users.
2. The iphone user experience is still strong, as Apple continues to stick to dual-core in the era of CPU frequency, 4-core, 8-core.
The above two points iOS is how to optimize, in the endurance, smoothness and response speed of the victory over Android, the answer is multithreaded &runloop ...
Runloop is the core mechanism of iOS Incident response and task processing, which runs through the entire iOS system.
Runloop Unlike normal thread-waiting tasks, a traditional thread-looping wait task causes CPU time to be consumed, although you set the sleep time, but many times there will be idling,
And Runloop is the monitoring event trigger processing mechanism, plainly, in the event of the CPU full production, when no event occurs, the thread hangs the wait event .
It can be said that Runloop is the main reason why iOS is more power-saving, fluent and user-friendly than Android.
Runloop also support the inter-thread communication mechanism, the function is very powerful and practical, small to understand a little bit of peer, found that peers know there is runloop, but the actual development of the use of Runloop only a small part.
The following is a multi-threaded programming and Runloop mind Map, about the demo, you can still add small to take.