concurrent-hash-map 0.0.6

This is a simple concurrent hash map written in Rust. It uses a design where read operations never lock against reads or writes, but writes can sometimes lock against other writes. In order to maintain concurrency on insert/removal operations, the map is segmented into several sub-maps, each of which has its own write lock. This code is currently extremely pre-alpha. Most particularly, it leaks memory on table growth and drop, as well as when using keys or values that (even transitively) use custom Drop implementations. It should be possible to fix this, but a clean solution will require support for running destructors in crossbeam (see crossbeam issue #13). For now it may be useful for long lived hashmaps with a relatively steady size, but I don't recommend using it for anything important :-).
Documentation
Build #2765474 2025-12-27 11:21:17

# rustc version rustc 1.94.0-nightly (1107bbac4 2025-12-26)

# docs.rs version docsrs 0.1.0 (e6d7c66e 2025-12-21 )

# build log [INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/concurrent-hash-map-0.0.6/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/concurrent-hash-map-0.0.6/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20251226-1.94.0-nightly-1107bbac4\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 47b73ec33ee8afcdc421b7d1f75d4c8a16fdb60a9d1c564ef98283ac5caa6855 [INFO] running `Command { std: "docker" "start" "-a" "47b73ec33ee8afcdc421b7d1f75d4c8a16fdb60a9d1c564ef98283ac5caa6855", kill_on_drop: false }` [INFO] [stderr] warning: no edition set: defaulting to the 2015 edition while the latest is 2024 [INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op [INFO] [stderr] Documenting concurrent-hash-map v0.0.6 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.34s [INFO] [stderr] Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/concurrent_hash_map/index.html [INFO] running `Command { std: "docker" "inspect" "47b73ec33ee8afcdc421b7d1f75d4c8a16fdb60a9d1c564ef98283ac5caa6855", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "47b73ec33ee8afcdc421b7d1f75d4c8a16fdb60a9d1c564ef98283ac5caa6855", kill_on_drop: false }` [INFO] [stdout] 47b73ec33ee8afcdc421b7d1f75d4c8a16fdb60a9d1c564ef98283ac5caa6855