rayon-tlsctx

Crates.iorayon-tlsctx
lib.rsrayon-tlsctx
version0.2.0
sourcesrc
created_at2021-05-21 12:14:12.630565
updated_at2021-05-24 17:44:31.608601
descriptionthread local contexts for rayon loops
homepage
repositoryhttps://github.com/h33p/rayon-tlsctx
max_upload_size
id400308
size15,117
Auri (h33p)

documentation

https://docs.rs/rayon-tlsctx

README

rayon-tlsctx

Crates.io API Docs Build and test MIT licensed

Thread local variables for Rayon thread pools

This crate provides a simple ThreadLocalCtx struct that allows to store efficient thread-local state that gets built by a lambda.

It is incredibly useful in multithreaded processing, where a context needs to be used that is expensive to clone. In the end, there will be no more clones occuring than number of threads in a rayon thread pool.

Commit count: 8

cargo fmt