vendored thread_local-rs crate
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Amanieu d'Antras 2ed68653c6
Some checks failed
Continuous integration / Test (push) Has been cancelled
Continuous integration / MSRV (push) Has been cancelled
Continuous integration / miri (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Merge pull request #92 from polarathene/docs/use-thread-scope-example
docs: Switch to `thread::scope()` for example
2026-02-18 08:33:57 +00:00
.github/workflows Fail CI if Clippy raises any warnings 2025-08-03 23:15:53 -07:00
benches Don't ignore Cargo.lock 2025-08-19 09:06:25 -07:00
src docs: Switch to thread::scope for example 2026-01-10 16:33:22 +13:00
.gitignore Newline 2025-08-19 09:07:00 -07:00
Cargo.lock Review feedback 2025-08-19 09:05:03 -07:00
Cargo.toml Separate benches into it own crate to keep it isolated from MSRV 2025-08-03 15:05:32 -07:00
CHANGELOG.md chore: release v1.1.9 2025-06-12 23:23:45 +00:00
LICENSE-APACHE Initial commit 2016-04-08 08:39:34 +01:00
LICENSE-MIT Initial commit 2016-04-08 08:39:34 +01:00
README.md Remove once_cell dependency 2024-04-23 02:44:03 -07:00

thread_local

Build Status crates.io

This library provides the ThreadLocal type which allow a separate copy of an object to be used for each thread. This allows for per-object thread-local storage, unlike the standard library's thread_local! macro which only allows static thread-local storage.

Documentation

Usage

Add this to your Cargo.toml:

[dependencies]
thread_local = "1.1"

Minimum Rust version

This crate's minimum supported Rust version (MSRV) is 1.63.0.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.