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!
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!