[][src]Function ckb_util::lock_or_panic

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

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.