commit | e1f0b36c9d13cfd4f33abae0ee426524cdf3538c | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Tue Aug 25 20:49:31 2020 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Tue Aug 25 20:49:31 2020 -0700 |
tree | 242124caf8b675ff3213a5ca180430d2e210adcb | |
parent | 6b6b9af4c41070a53d804bdd2f0b652e4c343dda [diff] |
Fix thread_local/METADATA Bug: 166324735 Test: make Change-Id: I068944b56a4aae2da8c5f73443906248097a4bb7
This library provides the ThreadLocal
and CachedThreadLocal
types 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
:
[dependencies] thread_local = "1.0"
and this to your crate root:
extern crate thread_local;
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.