fused-lock

Crates.iofused-lock
lib.rsfused-lock
version0.1.1
sourcesrc
created_at2021-02-26 16:05:22.153205
updated_at2021-08-25 20:48:21.437178
description Fused RwLock, that, once locked for reading, can not be used to obtain further exclusive access.
homepage
repositoryhttps://github.com/chorman0773/fused-lock-rs
max_upload_size
id360975
size19,906
Connor Horman (chorman0773)

documentation

https://docs.rs/fused-lock

README

Fused Lock

This library provides a type, FusedRwLock, which has exclusive/shared semantics.

At any time, one thread may hold an exclusive lock over contents, or any number of threads may hold a shared lock to those contents. However, unlike a standard RwLock, after being locked shared at any point, it becomes impossible to acquire an exclusive lock again.

This may provide an advantage over using a standard RwLock, any time you have a value that's only written to once, and, after being read, is never written again (for example, a registry that's locked before it's accessed, or a resource loading scheme)

License

Copyright (C) 2021 Connor Horman.

This software is dual-licensed under the terms of the MIT and Apache v2 license. See LICENSE-MIT and LICENSE-APACHE for details.

Any contribution intentionally submitted by you for inclusion in this repository must be dual-licensed as above.

Commit count: 8

cargo fmt