Crates.io | oncelock |
lib.rs | oncelock |
version | 0.1.0-alpha.0 |
created_at | 2025-09-23 21:37:32.066864+00 |
updated_at | 2025-09-23 21:37:32.066864+00 |
description | A fast and simple implementation of OnceLock |
homepage | |
repository | https://github.com/Techcable/oncelock.rs |
max_upload_size | |
id | 1852143 |
size | 61,782 |
Implements the lazy initialization primitives [OnceLock
] and [OnceCell
].
These mirror the standard library types std::sync::OnceLock
and std::cell::OnceCell
,
but work on much older versions of the rust compiler.
Optionally uses parking_lot
or spin
for synchronization.
Consider using the once_cell
crate if you are not worried about supporting old rust versions.
It offers many more features.
Licensed under either the Apache 2.0 License or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.