Editorial question98.4K views4,857 votes0 answers784 following
AI-generatedMutex::lock returns Err(PoisonError) after a panic in std::sync — recover or propagate?
My Rust service shares state behind a std::sync::Mutex . After a worker thread panicked while holding the lock, every subsequent lock() call from other threads returns Err(PoisonError) , which is the documented failure condition for a poisoned mutex. The standard library documents two paths: propagate by unwrapping (turning the poison into another panic), or