Crates.io | portable-atomic-util |
lib.rs | portable-atomic-util |
version | 0.2.4 |
source | src |
created_at | 2023-01-15 07:29:59.25069 |
updated_at | 2024-11-23 05:15:50.765752 |
description | Synchronization primitives built with portable-atomic. |
homepage | |
repository | https://github.com/taiki-e/portable-atomic |
max_upload_size | |
id | 759284 |
size | 182,884 |
Synchronization primitives built with portable-atomic.
Arc
. (optional, requires the std
or alloc
feature)task::Wake
. (optional, requires the std
or alloc
feature)See #1 for other primitives being considered for addition to this crate.
std
Use std
.
Note:
alloc
feature.alloc
Use alloc
.
Note:
std
feature is not enabled is Rust 1.36 that alloc
crate stabilized.One of the ways to enable cfg is to set rustflags in the cargo config:
# .cargo/config.toml
[target.<target>]
rustflags = ["--cfg", "portable_atomic_unstable_coerce_unsized"]
Or set environment variable:
RUSTFLAGS="--cfg portable_atomic_unstable_coerce_unsized" cargo ...
--cfg portable_atomic_unstable_coerce_unsized
Support coercing of Arc<T>
to Arc<U>
as in std::sync::Arc
.
This cfg requires Rust nightly because this coercing requires unstable CoerceUnsized
trait.
See this issue comment for another known workaround.
Note: This cfg is unstable and outside of the normal semver guarantees and minor or patch versions of portable-atomic-util may make breaking changes to them at any time.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.