-
Notifications
You must be signed in to change notification settings - Fork 78
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 we take the good things from libfringe and put them into may/generator #31
Comments
That's an awesome good idea! Currently the context switch would cost about 30ns on unix, this would improve the performance significantly. We need to integrate it in the generator library. I also want grab some good things from parking_lot about the thread wakeup, but this should be another issue. |
I think this is done in the nightly build. just include following config in your application's [replace]
"generator:0.6.5" = { git = "https://github.com/Xudong-Huang/generator-rs.git", branch = "libfringe" } this should replace all the dependent generator library by using the libfringe branch. Though the generator context switch is improved 2 times faster than the master branch, but it's not the critical bottleneck for coroutine tasks, so I didn't see much improvement for the heavy io test. |
for the stable branch use this feature we need to wait rust asm feature got stabled. |
https://github.com/edef1c/libfringe
This crate has rather nice approach to switching contexts:
The text was updated successfully, but these errors were encountered: