Skip to content

Use DashMap to replace KeyedStateBackend in crates/fluxus-runtime/src/state.rs #68

Description

@uran0sH

In crates/fluxus-runtime/src/state.rs, we define a map struct:

#[derive(Default)]
pub struct KeyedStateBackend<K, V> {
    state: Arc<RwLock<HashMap<K, V>>>,
}

And the dashmap has a similar definition:

pub struct DashMap<K, V, S = RandomState> {
    shift: usize,
    shards: Box<[CachePadded<RwLock<HashMap<K, V>>>]>,
    hasher: S,
}

So we can replace it with dashmap

https://github.com/xacrimon/dashmap

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions