Open nico-abram opened 5 years ago
It would be nice to be able to specify writer preference or reader preference.
Just using os defaults is a very bad idea in my opinión. It would be better to first enforce a default policy regardless of os, and allow changing it. Otherwise, we end up with wildly varying performance results (Like https://fy.blackhats.net.au/blog/html/2018/10/19/rust_rwlock_and_mutex_performance_oddities.html and https://www.slideshare.net/mobile/mitsunorikomatsu/performance-comparison-of-mutex-rwlock-and-atomic-types-in-rust ) and in the worst case, writer starvation.
This will probably be fixed once https://github.com/rust-lang/rust/pull/56410 lands.
It would be nice to be able to specify writer preference or reader preference.
Just using os defaults is a very bad idea in my opinión. It would be better to first enforce a default policy regardless of os, and allow changing it. Otherwise, we end up with wildly varying performance results (Like https://fy.blackhats.net.au/blog/html/2018/10/19/rust_rwlock_and_mutex_performance_oddities.html and https://www.slideshare.net/mobile/mitsunorikomatsu/performance-comparison-of-mutex-rwlock-and-atomic-types-in-rust ) and in the worst case, writer starvation.