Crate concurrent_map

source ·
Expand description

A lock-free B+ tree based on sled’s internal index structure, but supporting richer Rust types as keys and values than raw bytes.

This structure supports atomic compare and swap operations with the ConcurrentMap::cas method.

The ConcurrentMap allows users to tune the tree fan-out (FANOUT) and the underlying memory reclamation granularity (LOCAL_GC_BUFFER_SIZE) for achieving desired performance properties. The defaults are pretty good for most use cases but if you want to squeeze every bit of performance out for your particular workload, tweaking them based on realistic measurements may be beneficial. See the ConcurrentMap docs for more details.

This is an ordered data structure, and supports very high throughput iteration over lexicographically sorted ranges of values. If you are looking for simple point operation performance, you may find a better option among one of the many concurrent hashmap implementatinos that are floating around.

Structs

Error type for the ConcurrentMap::cas operation.
A lock-free B+ tree.
An iterator over a ConcurrentMap.

Traits

Trait for types for which a maximum possible value exists.
Trait for types for which a minimum possible value exists.