-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConcurrentState
#66
ConcurrentState
#66
Conversation
51cfb76
to
506dcc1
Compare
4a8857c
to
0cdc489
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this seems sound to me, as dashmap
does a lot of the heavy lifting here and allows us to Arc
this easily, and we're concentrating on concurrent reads.
/// ## Panics | ||
/// | ||
/// If the State has not been built with StateBuilder::with_bundle_update. | ||
/// If the State has not been built with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a drive-by docs-only change. underlying revm behavior changed
Adds a concurrently accessible version of the
State<Db>
from Revm. This manages a cache that can be updated by multiple threads via dashmap and an rwlock. The transitions can NOT be shared and require&mut self
. The idea is that we shouldArc
it and then drop the users and useArc::get_mut
to manage transitions