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: remove rwlock upgradable #4171

Closed
wants to merge 1 commit into from

Conversation

fraidev
Copy link
Contributor

@fraidev fraidev commented Sep 6, 2024

This week, I read this Blog Post about: Upgradable parking_lot::RwLock might not be what you expect.

Basically, saying that RwLockUpgradableReadGuard does something that most of the people don't expect. It updates the lock field to write, not only for the actual usage before been dropped.

Then, I found a usage of it in get_store of local store metadata. A method that is called a lot, and only the first time it was called as read, all the next times were being called as write!

@fraidev
Copy link
Contributor Author

fraidev commented Sep 11, 2024

#4175 should cover it better

@fraidev fraidev closed this Sep 11, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant