Skip to content

[libc++][shared_mutex] Do we have plan to favor readers over writers? #80000

Open
@Jolyon0202

Description

@Jolyon0202

libc++'s shared_mutex favor writers over readers, but libstdc++'s shared_mutex favor readers over writers defaultly.

libstdc++‘s shared_mutex use ptread_rwlock_t(PTHREAD_RWLOCK_PREFER_READER_NP defaultly), and it also support to favor writers over readers.

Official C++ Standard doesn't specify the std::shared_mutex policy. Explanation could be found in original N2406 proposal (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2406.html#shared_mutex_imp) in shared_mutex.

Do we have plan to favor readers over writers in shared_mutex?

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.performancethreadingissues related to threading

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions