RunLoop inside AFN
- AFN opens a thread dedicated to accessing network requests
- In this threading method, he
dispatch_once
modifies the method sum with static - In order to ensure the security of this method and only open up a memory space, and ensure that his thread does not die
- In this method he will call another
网络请求入口
method
- In this entry method he will create a RunLoop
- Then add a
NSMachPort
port, the purpose is to have Source in it (because the RunLoop of Source can really run) - Then start RunLoop, loop through RunLoop continuously, send messages continuously, and let him do things.
https://www.cnblogs.com/NSong/p/5477783.html