Expand description
Poison-safe lock accessors.
std::sync locks become poisoned when a thread panics while holding them;
afterwards every lock() panics again, permanently breaking the subsystem
for the rest of the process lifetime. These helpers recover the guard
instead, so one stray panic cannot take down unrelated code.
Functionsยง
- mutex_
lock - Acquire a mutex guard, recovering from a poisoned lock.
- read_
lock - Acquire a read guard, recovering from a poisoned lock.
- write_
lock - Acquire a write guard, recovering from a poisoned lock.