Skip to main content Module worker_local Copy item path Source use std::cell::Cell ; ๐ use std::cell::OnceCell ; ๐ use std::num::NonZero ; ๐ use std::ops::Deref ; ๐ use std::ptr ; ๐ use std::sync::Arc ; ๐ use parking_lot::Mutex ; ๐ use crate::outline ; ๐ use crate::sync::CacheAligned ; ๐ Registry Represents a list of threads which can access worker locals. RegistryData ๐ RegistryId ๐ A pointer to the RegistryData which uniquely identifies a registry.
This identifier can be reused if the registry gets freed. ThreadData ๐ WorkerLocal Holds worker local values for each possible thread in a registry. You can only access the
worker local value through the Deref impl on the registry associated with the thread it was
created on. It will panic otherwise. REGISTRY ๐ The registry associated with the thread.
This allows the WorkerLocal type to clone the registry in its constructor. THREAD_DATA ๐ A thread local which contains the identifier of REGISTRY but allows for faster access.
It also holds the index of the current thread.