dashmap icon indicating copy to clipboard operation
dashmap copied to clipboard

par_iter on a ReadOnlyView

Open njaard opened this issue 3 years ago • 2 comments

ReadOnlyView::iter() exists. There should be a ReadOnlyView::par_iter() too, so that it could be possible to do a for_each or collect on the items in parallel, with rayon.

njaard avatar Jan 12 '21 23:01 njaard

Seems useful. Marked this as needs help, I'll accept patches for this feature if I get those before I get around to this myself.

xacrimon avatar Feb 06 '22 16:02 xacrimon

Hey, I implemented this, simply copying the subset of rayon functionality for DashMap and relying on shards stored in ReadOnlyVIew.map.shards.

Had to pub(self) or pub(crate) in 3 places in total, I hope that's okay, it's how standard library goes about things like that as well.

tomkarw avatar Jul 20 '22 21:07 tomkarw