Did you know that a Mutex can get poisoned?
This occurs when the thread holding the lock panics.
After a Mutex gets poisoned, you can’t lock it again safely.
Most times, the best course of action is to crash and restart your program.
There’s an experimental API to unpoison Mutex, the idea is that you can overwrite the value to a good state and keep using the mutex as before the panic.
...
https://www.youtube.com/watch?v=OSxviZRYF20