DbLock.wait.clock.decision: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock Lines 229-247 of mylsm-lsm-store@0.6.0.1/src/DbLock.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&start_line=229&end_line=247 import Base import mylsm-lsm-store@0.6.0.1/src/DbLockPolicy.bend as Policy # Selects backoff or deadline logic from a monotonic elapsed-time sample. def wait.clock.decision( purpose: WaitPurpose, file: File, started_us: Nat, +timeout_ms: Nat, +backoff_ms: U32, operation: String, path: String, elapsed_ms: Nat ) -> WaitState: match purpose: case ChooseDelay{}: wait.delay.state(Policy.busy_wait_decision(elapsed_ms, timeout_ms, U32.to_nat(backoff_ms)), file, started_us, timeout_ms, backoff_ms, operation, path) case CheckDeadline{}: wait.deadline.state(Nat.sub(timeout_ms, elapsed_ms), file, started_us, timeout_ms, backoff_ms, operation, path) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=WaitPurpose https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=WaitState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=wait.deadline.state https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=wait.delay.state https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLockPolicy.bend&name=busy_wait_decision