Closed koute closed 1 year ago
Does TrieDBNodeIterator need to be Send (if not, could also make send the other needed iterators as long as they cannot leek rc (the internal triedbnodeiterator))?
Does TrieDBNodeIterator need to be Send (if not, could also make send the other needed iterators as long as they cannot leek rc (the internal triedbnodeiterator))?
I just need TrieDBRawIterator
to be Send
, but since actually, sorry, I had a brain fart, indeed TrieDBNodeIterator
is a thin wrapper around it it'll also automatically become Send
. There are no other Rc
s anywhere left so I think everything now will be Send
anyway?TrieDBNodeIterator
is not Send
since there's a RefCell
inside of TrieDB
. We could replace the RefCell
with a Mutex
or something to make it Send
(or perhaps do a more thorough refactoring), but for now I'll just leave it as is since that'd complicate things and I don't really need it.
A good old
is_sync
test maybe?
Good idea. I'll add it.
This PR replaces the
Rc
that's returned by the iterators with anArc
.I need this to make the iterators
Send
, which I need for further performance improvements insubstrate
.