lockmap

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


Licenses
MIT/Apache-2.0

Documentation

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");