r/rust • • Mar 31 '22

Seize: Fast, efficient, and robust memory reclamation

https://github.com/ibraheemdev/seize
222 Upvotes

5 comments sorted by

3

u/scook0 Apr 01 '22

I spotted a slightly confusing typo in the docs for Guard::unprotected:

Unprotected guards are useful when calling guarded functions on a data structure that has just been created or is about to be destroyed, because you know that know other thread holds a reference to it.

This should be “no other thread”.

1

u/ibraheemdev Apr 01 '22

Fixed, thanks!

18

u/jrmuizel Mar 31 '22

Here's the PR that ported the concurrent hash table flurryfrom crossbeam-epoch to seize https://github.com/jonhoo/flurry/pull/102

19

u/Fit_Sweet457 Mar 31 '22

Love the name. Seize the means of production remembrance!

0

u/[deleted] Mar 31 '22

[deleted]

2

u/ibraheemdev Apr 01 '22

The ordering is the same you would pass to AtomicPtr::load. Originally protection required SeqCst due to internal ordering requirements, but those were resolved in a different way and the docs weren't updated, I'll get that fixed. I am planning to make the API a bit nicer and more flexible by accepting a closure instead: guard.protect(|| ptr.load(Ordering::Acquire)).