9 releases

0.4.0 Apr 8, 2023
0.3.2 Jan 4, 2021
0.3.1 Nov 24, 2020
0.2.1 Jul 10, 2020
0.1.2 Aug 20, 2019

#427 in Concurrency

Download history 7015/week @ 2024-07-21 6459/week @ 2024-07-28 6895/week @ 2024-08-04 9669/week @ 2024-08-11 9282/week @ 2024-08-18 11545/week @ 2024-08-25 6545/week @ 2024-09-01 6942/week @ 2024-09-08 7056/week @ 2024-09-15 7338/week @ 2024-09-22 7923/week @ 2024-09-29 9646/week @ 2024-10-06 9201/week @ 2024-10-13 11919/week @ 2024-10-20 9508/week @ 2024-10-27 9980/week @ 2024-11-03

41,165 downloads per month
Used in 28 crates (16 directly)

MIT/Apache

64KB
921 lines

conquer-once

Synchronization primitives for lazy and one-time initialization using low-level blocking mechanisms with clear distinction between blocking and non-blocking methods and additional support for #[no_std] environments when using spin-locks.

Build Status Latest version Documentation License Rust 1.36+

Usage

To use this crate, add the following to your Cargo.toml

[dependencies]
conquer-once = "0.4.0"

Minimum Supported Rust Version (MSRV)

The minimum supported Rust version for this crate is 1.49.0.

Cargo Features

By default, conquer-once enables the std feature. With this feature enabled, the crate exports the Lazy, Once and OnceCell types that use an OS and standard library reliant blocking mechanism. Without this feature, the crate is #[no_std] environment compatible, but only exports the types in the crate's spin sub-module, which use spin-locks.

The feature can be disabled by specifying the dependency as follows:

[dependencies.conquer-once]
version = "0.4.0"
use-default-features = false

License

conquer-once is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Dependencies

~37KB