feat(rwlock_atomic): add new lints for using RwLock with atomic types
changelog: [rwlock_atomic]: new lint
changelog: [rwlock_integer]: new lint
r? @blyxyas
rustbot has assigned @blyxyas. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
Hey @blyxyas, would you be interested in reviewing?
Yes @Tunglies I'll review this one, could you give us some more information in the pull request's description? Is this fixing any existing issues? In general, more context on why this pull request is needed would be very appreciated.
Thanks!
Yes @Tunglies I'll review this one, could you give us some more information in the pull request's description? Is this fixing any existing issues? In general, more context on why this pull request is needed would be very appreciated.
Thanks!
I found Mutex rulesclippy::mutex_atomic and clippy::mutex_integer rules, use them for my comunnity's project clash-verge-rev to helps reduce Arc and lock performance cost, most are Arc<Mutex/Rwlock<bool>>. I tried write some basic branchmark for Arc<Mutex/RwLock<T>> and Atomic<T> with std lib, found that Arc<RwLock<T>> is even slower than Arc<Mutex<T>>. While continue performance development, if has Rwlock rule for this usage same as clippy::mutex_atomic and clippy::mutex_integer would be more convenience.
Reminder, once the PR becomes ready for a review, use @rustbot ready.
Hey @blyxyas I have merged the lints and renamed the lint file and its uibless counterpart. Looking forward to your feedback :3
@rustbot ready
:umbrella: The latest upstream changes (possibly 741b684c90097002ca98322160c6c92e7a248b47) made this pull request unmergeable. Please resolve the merge conflicts.
Hey @blyxyas, wondering if you still have interested with this? :)