Simple library for keyed asynchronous reader-writer locks
This repository has been archived on 2025-05-08. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
dependabot[bot] 8736ee44f2
Bump codecov/codecov-action from 4 to 5 in the actions group (#11)
Bumps the actions group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `codecov/codecov-action` from 4 to 5
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-15 14:19:16 +00:00
.github Bump codecov/codecov-action from 4 to 5 in the actions group (#11) 2024-11-15 14:19:16 +00:00
src Reformat code 2023-07-12 18:01:56 +02:00
.gitignore Initial commit 2023-04-21 18:40:28 +02:00
Cargo.toml v0.1.2 2023-09-20 10:42:38 +02:00
LICENSE Initial commit 2023-04-21 18:40:28 +02:00
README.md Fix readme 2023-05-23 15:07:16 +02:00
release.toml Merge remote-tracking branch 'ci/main' into develop 2023-05-02 14:35:50 +02:00

check test codecov Version dependency status

key-rwlock

Simple library for keyed asynchronous reader-writer locks.

Example

use key_rwlock::KeyRwLock;

#[tokio::main]
async fn main() {
    let lock = KeyRwLock::new();

    let _foo = lock.write("foo").await;
    let _bar = lock.read("bar").await;

    assert!(lock.try_read("foo").await.is_err());
    assert!(lock.try_write("foo").await.is_err());

    assert!(lock.try_read("bar").await.is_ok());
    assert!(lock.try_write("bar").await.is_err());
}