| Crates.io | rayon-tlsctx |
| lib.rs | rayon-tlsctx |
| version | 0.2.0 |
| created_at | 2021-05-21 12:14:12.630565+00 |
| updated_at | 2021-05-24 17:44:31.608601+00 |
| description | thread local contexts for rayon loops |
| homepage | |
| repository | https://github.com/h33p/rayon-tlsctx |
| max_upload_size | |
| id | 400308 |
| size | 15,117 |
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.