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

Mutex for fibers #23

Open
publicocean0 opened this issue Jan 29, 2020 · 3 comments
Open

Mutex for fibers #23

publicocean0 opened this issue Jan 29, 2020 · 3 comments

Comments

@publicocean0
Copy link

How do you handle a mutex with fibers? There is a library for fibers mutex?

@koba-e964
Copy link
Member

Do you want something like futures_locks::Mutex, but tailored for fibers-rs?
Then unfortunately I don't think that there's a library for this particular purpose. I don't think futures_locks::Mutex works either because fibers-rs uses its own mechanism for task scheduling.

@publicocean0
Copy link
Author

publicocean0 commented Feb 5, 2020

yes the problem is if there is a lock in normal version , the thread is suspended until signal notification instead in fibers scheduler it might be swiched to another fiber. The perfomance is higher . So i have to realize a custom lock library pratically

@publicocean0
Copy link
Author

sorry a question : but pratically also futures in rust are using continuation concept , right? is a different way to implement the same thing?

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