Module racy

Source
🔬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.

Structs§

LazyKeyExperimental
A type for TLS keys that are statically allocated.

Constants§

KEY_SENTVAL ðŸ”’ Experimental