fn recover_lock<'a, T>(
result: Result<MutexGuard<'a, T>, PoisonError<MutexGuard<'a, T>>>,
) -> MutexGuard<'a, T>Expand description
Helper to recover from mutex poisoning (CRIT-002).
If a thread panics while holding the lock, the mutex becomes “poisoned”. Rather than failing permanently, we recover the inner data and continue. This is safe because our inner state is consistent even if the operation that caused the panic was incomplete.