def lock_file

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

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

84# Attempts the nonblocking OS lock on the open file.
85def lock_file(file: File, operation: String, path: String) -> IO(Result<&1, &1, DurableError.Error, Lock>):
86  do IO<Result<&1, &1, DurableError.Error, Lock>>:
87    pair : File & Result<&1, &1, U32 & String, Unit> <- DbLock.try_lock(file)
88    lock_result(pair, operation, path)

Uses (12)

Used by (1)