Function ckb_util::lock_or_panic[][src]

pub fn lock_or_panic<T>(data: &Mutex<T>) -> MutexGuard<'_, T>
Expand description

Holds the mutex lock or panics after timeout.

This is used to panic and restart the app on potential dead lock.

Try to hold the lock or panic after the timeout TRY_LOCK_TIMEOUT.