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. .cargo_vcs_info.json
  2. .gitignore
  3. .travis.yml
  4. Cargo.toml
  5. Cargo.toml.orig
  6. LICENSE-APACHE
  7. LICENSE-MIT
  8. METADATA
  9. MODULE_LICENSE_APACHE2
  10. OWNERS
  11. README.md
  12. benches/
  13. src/
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.