std::thread_local!
[−]
[src]
macro_rules! thread_local { (static $name:ident: $t:ty = $init:expr) => ( static $name: $crate::thread::LocalKey<$t> = __thread_local_inner!($t, $init, #[cfg_attr(all(any(target_os = "macos", target_os = "linux"), not(target_arch = "aarch64")), thread_local)]); ); (pub static $name:ident: $t:ty = $init:expr) => ( pub static $name: $crate::thread::LocalKey<$t> = __thread_local_inner!($t, $init, #[cfg_attr(all(any(target_os = "macos", target_os = "linux"), not(target_arch = "aarch64")), thread_local)]); ); }
Declare a new thread local storage key of type std::thread::LocalKey
.
See LocalKey documentation for more information.