Skip to content
Per-object thread-local storage for Rust
Rust
Branch: master
Clone or download
Latest commit 5db25ec Sep 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benches Add benchmarks Jun 27, 2017
src Bump MSRV to 1.27.2 (required by lazy_static) and fix warning Sep 7, 2019
.gitignore
.travis.yml Bump MSRV to 1.27.2 (required by lazy_static) and fix warning Sep 7, 2019
Cargo.toml Bump version to 1.0 Sep 7, 2019
LICENSE-APACHE Initial commit Apr 8, 2016
LICENSE-MIT Initial commit Apr 8, 2016
README.md Bump version to 1.0 Sep 7, 2019

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.

You can’t perform that action at this time.