Skip to main content

acquire_both_or_backoff

Function acquire_both_or_backoff 

Source
pub fn acquire_both_or_backoff<T: Transaction>(
    first: &ChainLock<T>,
    second: &ChainLock<T>,
    token: &ChainLockTransactionToken<T>,
) -> bool
Expand description

Utility to simplify expressions where two chain locks need to be acquired with backoff. Returns true if both locks were acquired or false if the current transaction needs to back off.