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

Replace Mutex<RefCell<T>> with RwLock<T> #193

Closed
jonathanpallant opened this issue Sep 17, 2024 · 1 comment
Closed

Replace Mutex<RefCell<T>> with RwLock<T> #193

jonathanpallant opened this issue Sep 17, 2024 · 1 comment

Comments

@jonathanpallant
Copy link
Member

An RwLock is a more gentle way to introduce both sharing and mutability in the same type.

@jonathanpallant
Copy link
Member Author

I may have been confused. We have to do critical_section::Mutex<RefCell<T>> because the critical_section::Mutex is re-entrant. The std::sync::Mutex however gives you an object that implements DerefMut.

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

1 participant