Bug: 153119948

Clone this repo:
  1. 7cd98bb Upgrade rust/crates/thread_local to 1.1.0 by Haibo Huang · 9 days ago master
  2. a076479 Mark ab/6881855 as merged by Xin Li · 8 weeks ago
  3. c833f5a TEST_MAPPING: test dependers of this crate am: 25e739a59c by Jeff Vander Stoep · 2 months ago
  4. 25e739a TEST_MAPPING: test dependers of this crate by Jeff Vander Stoep · 2 months ago
  5. e9e4ab3 Copy description from Cargo.toml to METADATA am: bae971e3f3 by Chih-Hung Hsieh · 3 months ago


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.



Add this to your Cargo.toml:

thread_local = "1.0"

and this to your crate root:

extern crate thread_local;

Minimum Rust version

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


Licensed under either of

at your option.


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.