lockmap

Crates.iolockmap
lib.rslockmap
version0.1.1
sourcesrc
created_at2024-11-21 06:11:42.073079
updated_at2024-11-22 06:45:49.106641
descriptionA high-performance, thread-safe HashMap implementation for Rust that provides fine-grained locking at the key level.
homepagehttps://github.com/SF-Zhou/lockmap
repositoryhttps://github.com/SF-Zhou/lockmap
max_upload_size
id1455758
size39,780
(SF-Zhou)

documentation

README

lockmap

Rust codecov Crates.io Documentation

A high-performance, thread-safe HashMap implementation for Rust that provides fine-grained locking at the key level.

Usage

use lockmap::LockMap;

// Create a new lock map
let map = LockMap::new();

// Set a value
map.set("key", "value");

// Get a value
assert_eq!(map.get("key"), Some("value"));

// Use entry API for exclusive access
{
    let entry = map.entry("key");
    *entry.value = Some("new value");
}

// Remove a value
map.remove("key");
Commit count: 2

cargo fmt