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

[chore] Replace Mutex with RwLock for themes #41

Open
cylewitruk opened this issue Apr 12, 2024 · 2 comments
Open

[chore] Replace Mutex with RwLock for themes #41

cylewitruk opened this issue Apr 12, 2024 · 2 comments

Comments

@cylewitruk
Copy link
Contributor

Since the theme is write-once, read-many, I think a RwLock would be more appropriate than a Mutex. I remember running into deadlocks on accident when writing the multiprogress suggestion PR, and this would simply make it easier to avoid such caveats.

@fadeevab
Copy link
Owner

@cylewitruk It sounds reasonable, I remember running into deadlocks too, however, due to urgency, I evaded deadlocks via timely unlocking.

@cylewitruk
Copy link
Contributor Author

@cylewitruk It sounds reasonable, I remember running into deadlocks too, however, due to urgency, I evaded deadlocks via timely unlocking.

Yeah no I get it, I just ran into this with my own theme handling using Mutex and resolved with RwLock, hence I I bring it up here 😊

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