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

vs libuv #5

Open
littleforce163 opened this issue Oct 27, 2020 · 1 comment
Open

vs libuv #5

littleforce163 opened this issue Oct 27, 2020 · 1 comment

Comments

@littleforce163
Copy link

你好!
请问这个工程项目对比libuv有哪些优势?
我想找到一个比libuv性能更好,支持多核cpu的库。主要应用是python的uvloop,一个libuv的包装,单核性能还可以,希望可以充分利用多核,性能再好些更好了。
谢谢

@xhawk18
Copy link
Owner

xhawk18 commented Oct 28, 2020

这个项目和libuv不是替代关系。
它使用libuv时,也是对libuv的包装,目的是用直白的顺序逻辑,改造原来难写的回调逻辑。
例子:https://github.com/xhawk18/s_task/blob/master/examples/ex3_http_client.c

和libuv一样,建议一个uvloop只应用于一个线程。
如果要发挥多核优势,根据cpu核心线程数,多起几个uvloop就可以了。

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