WorkerLocal in rustc_data_structures::sync::worker_local - Rust (original) (raw)
pub struct WorkerLocal<T> {
locals: Box<[CacheAligned<T>]>,
registry: Registry,
}
Expand description
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.
Creates a new worker local where the initial
closure computes the value this worker local should take for each thread in the registry.
Returns the worker-local values for each thread
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes