#lazy #initialization #no-std #one-time #multi-threading

no-std conquer-once

Synchronization primitives for lazy and one-time initialization

5 releases

✓ Uses Rust 2018 edition

new 0.2.1 Jul 10, 2020
0.2.0 Dec 24, 2019
0.1.2 Aug 20, 2019
0.1.1 Aug 20, 2019
0.1.0 Aug 19, 2019

#52 in Concurrency

Download history 128/week @ 2020-03-16 165/week @ 2020-03-23 184/week @ 2020-03-30 131/week @ 2020-04-06 132/week @ 2020-04-13 107/week @ 2020-04-20 110/week @ 2020-04-27 101/week @ 2020-05-04 112/week @ 2020-05-11 165/week @ 2020-05-18 108/week @ 2020-05-25 113/week @ 2020-06-01 100/week @ 2020-06-08 180/week @ 2020-06-15 145/week @ 2020-06-22 169/week @ 2020-06-29

587 downloads per month
Used in 2 crates

MIT/Apache

57KB
771 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.2.1"

Minimum Supported Rust Version (MSRV)

The minimum supported Rust version for this crate is 1.36.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.2.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

~35KB