16 releases

0.3.6 Aug 15, 2018
0.3.5 Dec 9, 2017
0.3.4 Jun 27, 2017
0.3.3 Feb 20, 2017
0.2.6 May 30, 2016

#3 in Concurrency

Download history 41781/week @ 2018-05-26 49638/week @ 2018-06-02 50046/week @ 2018-06-09 46653/week @ 2018-06-16 49174/week @ 2018-06-23 50515/week @ 2018-06-30 48826/week @ 2018-07-07 51085/week @ 2018-07-14 52310/week @ 2018-07-21 49747/week @ 2018-07-28 52497/week @ 2018-08-04 52172/week @ 2018-08-11 52695/week @ 2018-08-18

215,710 downloads per month
Used in 3,265 crates (13 directly)

Apache-2.0/MIT

32KB
602 lines

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 = "0.3"

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.

Dependencies

~13KB