concurrent_open_map

Crates.ioconcurrent_open_map
lib.rsconcurrent_open_map
version0.1.0
sourcesrc
created_at2024-07-10 01:49:17.695428
updated_at2024-07-10 01:49:17.695428
descriptionA concurrent hashmap implementation in Rust
homepagehttps://github.com/nnsgmsone
repositoryhttps://github.com/nnsgmsone/concurrent_open_map
max_upload_size
id1297699
size51,112
(nnsgmsone)

documentation

https://docs.rs/concurrent_hashmap

README

Concurrent HashMap for Rust

This library provides a concurrent hash map implementation similar to Go's sync.Map, with additional performance optimizations for the get function.

Features

  • Concurrency: Safe concurrent access using fine-grained locking.
  • Performance: Optimized get function for faster reads.
  • API Compatibility: Supports all functions provided by Go's sync.Map.

Usage

Getting Started

// create a new hashmap
let mp: Map<u64, u64> = Map::new();

// set the value for key
mp.store(1, 1);
mp.store(1, 2);
mp.store(2, 1);

// get value by key
let v = mp.load(1)

// delete the value for a key.
m.delete(1)

Benchmark

License

hashmap source code is available under the GPL License.

Commit count: 6

cargo fmt