rust-sthash icon indicating copy to clipboard operation
rust-sthash copied to clipboard

Rc<HashInner> and Rayon

Open alienscience opened this issue 3 years ago • 0 comments

Many thanks for writing sthash -- it is a cool library. I would like to use sthash within Rayon to hash small blocks in parallel.

I have the problem that the Rc<HashInner> is not thread safe. Would you consider accepting a pull request that removes the Rc completely? As far as I can tell, this would make Clone less efficient but would make the Hasher thread safe without the overhead of adding an Arc.

I can see no mutation of HashInner and so I think this suggested change is possible.

alienscience avatar Apr 15 '22 09:04 alienscience