Platform Tools Release 30.0.0 (6405830)
Import 'thread_local' package version 1.0.1

* Add OWNERS
* No Android.bp yet
Bug: 152884384
Test: make

Change-Id: I50daca2484475354a0f7696a1ad755a0738697c3
17 files changed
tree: 50fb0b53a7a97197d5529f07d42d09e674a56e17
  1. benches/
  2. src/
  3. .cargo_vcs_info.json
  4. .gitignore
  5. .travis.yml
  6. Cargo.toml
  7. Cargo.toml.orig
  8. LICENSE-APACHE
  9. LICENSE-MIT
  10. METADATA
  11. MODULE_LICENSE_APACHE2
  12. OWNERS
  13. README.md
README.md

thread_local

Build Status Crates.io

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.

Documentation

Usage

Add this to your Cargo.toml:

[dependencies]
thread_local = "1.0"

and this to your crate root:

extern crate thread_local;

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.