def open.existing.wait.present

mylsm-lsm-store@0.6.0.1 · src/ByteDurableDb.bend:442

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

442def open.existing.wait.present(
443  +path: String,
444  +timeout_ms: U32,
445  +backoff_ms: U32,
446  result: Result<&1, &1, U32 & String, Bool>
447) -> IO(Result<&1, &1, Error, Handle>):
448  match result:
449    case Fail{error}:
450      IO.pure(Result<&1, &1, Error, Handle>, Fail{io.error(error)})
451    case Done{False{}}:
452      IO.pure(Result<&1, &1, Error, Handle>, Fail{NotFound{}})
453    case Done{True{}}:
454      do IO<Result<&1, &1, Error, Handle>>:
455        canonical : Result<&1, &1, U32 & String, String> <- Fs.canonical_path(path)
456        open.existing.wait.canonical(canonical, timeout_ms, backoff_ms)

Uses (13)

Used by (1)