commit | fab775ec1cdfcb685a050cc82ace5f213166ffa6 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Thu Aug 27 23:47:10 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Aug 27 23:47:10 2020 +0000 |
tree | 242124caf8b675ff3213a5ca180430d2e210adcb | |
parent | 54ae9e02b0ce1b3966a8426d4d32c432f75fb3d9 [diff] | |
parent | fecb99cd56833e237f84998691dcb3103340340c [diff] |
Fix thread_local/METADATA am: e1f0b36c9d am: 93bb2ff6ea am: 7ecfaeedad am: fecb99cd56 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/thread_local/+/1413812 Change-Id: I9592ad7df897b2b34a5a9e4096b5623039bc0e14
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.