Macro tari_utilities::acquire_lock
source · macro_rules! acquire_lock { ($e:expr, $m:ident) => { ... }; ($e:expr) => { ... }; }
Expand description
This macro returns a Mutex or RwLock guard without returning a PoisonError
.
If the lock is poisoned (i.e. a panic before a MutexGuard / RwLockGuard is dropped), the last value before the panic
occurred is used. The semantics of this macro are similar to a database transaction rollback on failure.