Skip to content

RwLock: support upgrades and downgrades #69240

Description

@d-e-s-o

I think it would be great (certainly useful for me) if RwLock were to support read-write upgrades and write-read downgrades. Currently I don't see a way to accomplish the same and I always have to get write access over the entire operation.

parking_lot currently supports both cases (here & here). I also understand that there exists a proposal to use parking_lot as the lock implementation backend.

Once (if) that lands, it should merely be a matter of extending the std APIs to provide such support.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions