sharded-slab icon indicating copy to clipboard operation
sharded-slab copied to clipboard

Draining iterator

Open jplatte opened this issue 1 year ago • 1 comments

I'm not very knowledgeable about lock-free data structures; would it be possible to provide a draining iterator that yields all items that exist at the time it is constructed?

jplatte avatar Mar 01 '23 12:03 jplatte

It would require exclusive mutable access to the slab, similar to the existing Slab::unique_iter method. But, we could potentially provide something like that.

hawkw avatar Sep 27 '23 21:09 hawkw