Skip to content

Document RwLockWriteGuard::downgrade() guarantees #100

@nazar-pc

Description

@nazar-pc

parking_lot has important details about guarantees provided by RwLockWriteGuard::downgrade(): https://docs.rs/parking_lot/0.12.4/parking_lot/type.RwLockWriteGuard.html#method.downgrade

It'd be very helpful to know what guarantees are provided by RwLockWriteGuard::downgrade() in async-lock.

For example, I need the following:

  1. downgrade is atomic and no writers can acquire lock in the meantime
  2. no currently waiting writers prevent any pending or future read locks from being acquired

parking_lot guarantees 1, but does not fully guarantee 2 (though it doesn't say it will never happen either).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions