Open hypirion opened 10 years ago
How about hazard pointers as in this hamt implementation? (Not a rhetorical question as I do not know myself if it would be appropriate.) https://github.com/ballard26/concurrent-hamt
That's a valid question: It could be interesting for a concurrent RRB-tree, but this version is (currently) only immutable and transient, so it would incur more overhead than basic refcounting.
It sounds like something worth looking into in the future though!
It is a tempting thought because together with the ctrie it could be used to create a Lua table like universal map data structure with lock-free concurrency, then maybe build Iacono's working set structure on top to get cache-obliviousness.
Providing a refcount variant will make portability to non-GC languages (Rust, C++, etc.) easier.