def acquire

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

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

102# Opens the stable LOCK file and acquires its OS lock.
103def acquire(+path: String, operation: String) -> IO(Result<&1, &1, DurableError.Error, Lock>):
104  do IO<Result<&1, &1, DurableError.Error, Lock>>:
105    result : Result<&1, &1, U32 & String, File> <- File.open(lock_path(path), "a")
106    opened(result, operation, path)

Uses (12)

Used by (6)