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

Can using aio instead of multi-threading for asynchronous I/O? #34

Open
liexusong opened this issue Dec 16, 2014 · 3 comments
Open

Can using aio instead of multi-threading for asynchronous I/O? #34

liexusong opened this issue Dec 16, 2014 · 3 comments

Comments

@liexusong
Copy link

I think using aio better than multi-threading.

@TheReverberation
Copy link

I just ran two primitive tests with stdio and a simple complexity calculation of O(1). 100 threads were started using pthreads and lthreads. So, user time: pthreads: ~270ms, lthreads: ~600ms and sys time: 650/350ms accordingly. I want to ask the lthreads community, have you tested the speed of the library in real projects, in particular, have you built an asynchronous server?

@wanghaEMQ
Copy link

It is because that context switch needs time.
I think lthread is not an out-of-the-box project. It must be changed before being applied.
For example. The computed tasks and defer tasks should be separated into other pthreads.

@wanghaEMQ
Copy link

@TheReverberation 100 pthreads VS 100 lthreads? or more than 100 lthreads in 100 pthreads? Maybe you can show your code.

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

3 participants