Rust's Mutex Poisoning Is a Cost Every Program Pays and Almost None Need

Mutex poisoning is not for everyone

Rust's Mutex Poisoning Is a Cost Every Program Pays and Almost None Need

Mutex poisoning has been a default in Rust since the beginning, but it inflates every lock with extra atomics, poison checks, and panic machinery — turning a 34-line assembly fast path into 147 lines — to guard against a rare invalid-state scenario. The author argues the common case should be easy and the rare case merely possible, and welcomes the non-poisoning mutexes now landing in nightly.

Rust's default behaviour should make the common case easy and the rare case possible.

More from this day

2026-11-24