commit | 33c60130a134345d90af4d55ce452123907a0e0e | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Mon Jul 06 13:34:44 2020 -0700 |
committer | Matthew Maurer <mmaurer@google.com> | Mon Jul 06 13:34:44 2020 -0700 |
tree | adc522b01e312ba50862f765f1fe10c6ba88eea1 | |
parent | c5c8a04104544a2aa9b827780f7fa213f810ae2e [diff] |
Support building all variants. Bug: 143217452 Test: cd external/rust; mma; atest in all TEST_MAPPING subdirs Change-Id: Ie2f5bd27886a98ce3fc0b9793cfa993b24c67d17
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.