Registry / utility / thread-local

thread-local

JSON →
library1.1.9rscratesunverified

Per-object thread-local storage for Rust, allowing each thread to have its own instance of a value.

# Cargo.toml [dependencies] thread_local = "1.1.9"
INSTALL
IMPORT
SIG · THREAD-LOCAL
T
thread-local
utilityrustv1.1.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ThreadLocal
use thread_local::ThreadLocal;

Creates a thread-local vector and pushes a value.

use thread_local::ThreadLocal; let tls: ThreadLocal<Vec<u32>> = ThreadLocal::new(); tls.get_or(|| Vec::new()).push(42);
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.9latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
thread-local — cargo add thread-local · libregistry