lockmap 0.1.3

A high-performance, thread-safe HashMap implementation for Rust that provides fine-grained locking at the key level.
Documentation
lockmap-0.1.3 has been yanked.

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::<String, String>::new();

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

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

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

// Remove a value
map.remove("key");