Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不耗CPU ? #4

Open
yupliang opened this issue Oct 24, 2017 · 1 comment
Open

不耗CPU ? #4

yupliang opened this issue Oct 24, 2017 · 1 comment

Comments

@yupliang
Copy link

实现方法单独起一个global thread,内置一个runloop,所有的connection都由这个runloop发起,回调也是它接收,不占用主线程,也不耗CPU资源。厉害👍🏻

@Lianghuajian
Copy link

实现方法单独起一个global thread,内置一个runloop,所有的connection都由这个runloop发起,回调也是它接收,不占用主线程,也不耗CPU资源。厉害👍🏻

感觉应该是:RunLoop 来处理网络请求的线程可以很好地管理线程生命周期,并在处理网络请求的同时减少 CPU 的不必要使用,维护这个 RunLoop 的方式使得 CPU 相关资源使用上较为高效的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants