DbLock.acquire_wait.started: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock Lines 322-338 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=322&end_line=338 import Base import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError # Begins retries after validating the monotonic clock source. def acquire_wait.started( file: File, operation: String, path: String, timeout_ms: U32, backoff_ms: U32, result: Result<&1, &1, U32 & String, Nat> ) -> IO(Result<&1, &1, DurableError.Error, Lock>): match result: case Fail{error}: wait.host_error(file, error, operation, path) case Done{started_us}: +timeout = U32.to_nat(timeout_ms) fuel = Nat.add(Nat.mul(timeout, 8n), 8n) wait.loop(fuel, TryLock{file, started_us, timeout, backoff_ms, operation, path}) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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=Lock 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.host_error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=wait.loop https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableError.bend&name=Error