Skip to main content

Module chainlock

Module chainlock 

Source

Structs§

ChainLock
Environment-independent chain lock interface and protocol.

Enums§

AllowFinalized
Specifies whether ChainLock::try_acquire_with_options is allowed when the active transaction has already been finalized.
RecordBackoff
Specifies whether ChainLock::try_acquire_with_options should record contention backoff state if acquisition fails due to a higher-priority transaction holding the lock.
Result
Result of attempting to acquire a ChainLock.

Functions§

acquire_both_or_backoff
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.