37

聊聊 iOS 中的 RunLoop 考题 (中文版) - 简书

 6 years ago
source link: https://www.jianshu.com/p/d8dcc0fc8150?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Run Loop 是与进程相关的基础设施。Run Loop 是来协调待接受的事件、安排调度的,事件处理循环。Run Loop 的作用就是,有任务,开起进程,没任务,休眠进程。 翻译自苹果的 runloop 文档 上一段代码 ,与 NSRunLoop 和 NSThread 相关, Run Loop 是处理 sockets 网络, ports 端口, files 文件 , keyboard ...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK