Skip to content

RwLock: Priority policy #2674

Open
Open
@nico-abram

Description

@nico-abram

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syncSynchronization related proposals & ideasT-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions