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

Async RwLock and Mutex. #298

Open
weisrc opened this issue Sep 2, 2024 · 3 comments
Open

Async RwLock and Mutex. #298

weisrc opened this issue Sep 2, 2024 · 3 comments
Labels
F-feature-request feature request

Comments

@weisrc
Copy link

weisrc commented Sep 2, 2024

The local sync library doesn't have an async RwLock and Mutex.

@weisrc weisrc added the F-feature-request feature request label Sep 2, 2024
@ihciah
Copy link
Member

ihciah commented Sep 2, 2024

Async RwLock and Mutex do not depend on async runtime. You can use any implementation. I think it's better to provide them in third-party libraries.
Note: if you want these mutex work under monoio, please enable sync feature, since these mutex require futures be able to woken from another thread.

@weisrc
Copy link
Author

weisrc commented Sep 4, 2024

Ok, thanks. So I can use Tokio's Async RwLock and Mutex safely with Monoio?

@ihciah
Copy link
Member

ihciah commented Sep 6, 2024

So I can use Tokio's Async RwLock and Mutex safely with Monoio?

Yes. You can also use its channel implementation, or third-party crates like async-channel.

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

No branches or pull requests

2 participants