def wait.attempt.state

mylsm-lsm-store@0.6.0.1 · src/DbLock.bend:179

import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock
import Base

179# Converts a raw lock failure into the next owned state.
180def wait.attempt.state(
181  decision: AttemptDecision,
182  file: File,
183  started_us: Nat,
184  timeout_ms: Nat,
185  backoff_ms: U32,
186  operation: String,
187  path: String
188) -> WaitState:
189  match decision:
190    case Contended{}:
191      ReadClock{file, started_us, timeout_ms, backoff_ms,
192        operation, path, ChooseDelay{}}
193    case Failed{error}:
194      WaitFatal{file, error, operation, path}

Uses (7)

Used by (1)