deadlock 0.4.0

Stable-ID slot map and min-heap with unsync and thread-safe (sync) variants.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
# deadlock
Stable-ID slot map and slot heap for Rust - both single-threaded (`unsync`) and thread-safe (`sync`) variants.

![crates.io](https://img.shields.io/crates/v/deadlock?style=flat-square)
![docs.rs](https://img.shields.io/docsrs/deadlock?style=flat-square)
![License](https://img.shields.io/github/license/kimhappy/deadlock?style=flat-square)

| Type | Description |
|---|---|
| `unsync::SlotMap<T>` | Single-threaded slot map. O(1) insert / remove / lookup by stable ID. |
| `unsync::SlotHeap<K, V>` | Single-threaded min-heap. O(log n) insert / pop / remove / heapify by stable ID. |
| `sync::SlotMap<T>` | Thread-safe slot map. Concurrent inserts, removes, and reads on independent shards. |
| `sync::SlotHeap<K, V>` | Thread-safe min-heap. Mutations are serialized via an internal lock. |