// the find
jonhoo/left-right
A lock-free, read-optimized, concurrency primitive.
left-right is a Rust concurrency primitive that maintains two copies of a data structure — one for readers, one for the single writer — enabling lock-free reads that scale linearly with core count. The writer absorbs all coordination cost, so reads are nearly free. This is the underlying primitive behind Jon Gjengset's `evmap` and is worth knowing if you're building read-heavy concurrent data structures.
Single-writer/multi-reader model gives you genuinely wait-free reads — no locks, no atomics on the hot read path. The double-buffering approach is well-understood academically (it's a variant of the left-right concurrency control technique from the literature) and the implementation is faithful to that model. Loom integration for concurrency testing is present in the test suite, which is rare and meaningful. Jon Gjengset wrote it, which is a quality signal — he literally teaches this stuff on YouTube and has a book on advanced Rust.
Single writer only — if your workload has any write contention, this buys you nothing and the double-buffering overhead makes things worse than a plain RwLock. Two copies of the data means 2x memory, which matters for large structures. The API forces you to implement an `Absorb` trait to describe how to apply operations to both copies, which is more boilerplate than most users expect and easy to get subtly wrong. The crate is in maintenance mode — recent commits are dependency bumps, not feature work, so don't expect active development.