Inkme News

← Back to list

In defense of lock poisoning in Rust (2025)

This article defends the concept of lock poisoning in Rust, arguing that it is crucial for maintaining system correctness when unexpected cancellations or panics occur within critical sections. The author counters recent proposals to make Rust's default mutex non-poisoned, suggesting that a `Poison` wrapper is valuable for tracking such states and that the benefits of explicit error handling outweigh conceptual elegance in separating locking from poisoning.

Background

Recent discussions in the Rust community and on Hacker News have proposed changing the default behavior of mutexes to silently unlock on panic (non-poisoned) to simplify error handling, which has sparked debate among core developers and users about the safety implications of such a change.

Source
Lobsters
Published
Nov 26, 2026 at 07:51 PM
Score
6.0 / 10