#thread-local #alternatives #macro #values #thread-id

thread_map

Types that are simple and easy-to-use alternatives to the std::thread_local macro

5 releases (2 stable)

1.0.1 Feb 5, 2025
1.0.0 Feb 2, 2025
0.1.0 Dec 31, 2024
0.0.2 Dec 30, 2024
0.0.1 Dec 29, 2024

#408 in Concurrency

Download history 163/week @ 2024-12-24 177/week @ 2024-12-31 13/week @ 2025-01-07 2/week @ 2025-01-14 96/week @ 2025-01-28 172/week @ 2025-02-04 20/week @ 2025-02-11

288 downloads per month

MIT license

25KB
475 lines

thread_map

This library provides types that support thread-local values by associating ThreadIds to the values. It is a simple and easy-to-use alternative to the std::thread_local macro and the thread_local crate. It has no dependencies.

Documentation

See the API documentation on docs.rs, which includes an overview and usage examples, and the source repo.

Support

Create a new issue on GitHub.

License

This library is distributed under the terms of the MIT license, with copyright retained by the author.

See LICENSE for details.


lib.rs:

No runtime deps