def wait.deadline.state

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

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

213# Converts a post-sleep deadline sample into a retry or timeout state.
214def wait.deadline.state(
215  remaining_ms: Nat,
216  file: File,
217  started_us: Nat,
218  timeout_ms: Nat,
219  backoff_ms: U32,
220  operation: String,
221  path: String
222) -> WaitState:
223  match remaining_ms:
224    case 0n:
225      WaitExpired{file, operation, path}
226    case 1n+_:
227      TryLock{file, started_us, timeout_ms, backoff_ms, operation, path}

Uses (5)

Used by (1)