Expand description
Taking a lock whose holder may have panicked.
A panic in a thread that holds a Mutex, or holds an RwLock for
writing, poisons the lock: std’s way of saying the value may be
half-changed. These helpers are for a lock whose every change is whole
before anything in it can panic, so the caller uses the poisoned lock’s
value as it is. A
lock whose change can leave half-made state needs a different answer, which
its owner chooses.
Functions§
- into_
unpoisoned - Return the value of
mutex, which no panic can leave half-changed, and consume the mutex. - lock_
unpoisoned - Lock
mutex, whose value no panic can leave half-changed. - read_
unpoisoned - Read
lock, whose value no panic can leave half-changed. - wait_
unpoisoned - Wait on
condvarwithguard, the guard of a lock whose value no panic can leave half-changed. - write_
unpoisoned - Write
lock, whose value no panic can leave half-changed.