Reconsidering node access and mutation in the consumer crate #39
mwcampbell
started this conversation in
Ideas
Replies: 1 comment
-
I have been reading this article which introduce the crossbeam-epoch crate. It allows to create concurrent, lock free data structures. This might be worth investigating. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been thinking about the best way to manage node access and mutation. Here are the goals I want to achieve:
UIA_E_ELEMENTNOTAVAILABLE
error.These goals are currently met by using
RwLock
to implement interior mutability. This solution has two downsides:My proposed rough solution is to wrap each node in an
Arc
and store the map from node IDs to nodes in a persistent, copy-on-write map like the ones in the [im crate]https://docs.rs/im/15.0.0/im/). I'd appreciate thoughts on this solution, or other ideas.Beta Was this translation helpful? Give feedback.
All reactions