Crates.io | fused-lock |
lib.rs | fused-lock |
version | 0.1.1 |
source | src |
created_at | 2021-02-26 16:05:22.153205 |
updated_at | 2021-08-25 20:48:21.437178 |
description | Fused RwLock, that, once locked for reading, can not be used to obtain further exclusive access. |
homepage | |
repository | https://github.com/chorman0773/fused-lock-rs |
max_upload_size | |
id | 360975 |
size | 19,906 |
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)
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.