๐ฌThis is a nightly-only experimental API. (
thread_local_internals)Expand description
A LazyKey implementation using racy initialization.
Unfortunately, none of the platforms currently supported by std allows
creating TLS keys at compile-time. Thus we need a way to lazily create keys.
Instead of blocking API like OnceLock, we use racy initialization, which
should be more lightweight and avoids circular dependencies with the rest of
std.
Re-exportsยง
use crate::sync::atomic::Atomic;๐Experimental use crate::sync::atomic::AtomicUsize;๐use crate::sync::atomic::Ordering;๐
Structsยง
- LazyKey
Experimental - A type for TLS keys that are statically allocated.
Constantsยง
- KEY_
SENTVAL ๐Experimental Neither QNX SDP 7.x nor QNX SDP 8.0+