package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053

doc/octez-libs.stdlib-unix/Tezos_stdlib_unix/Lwt_lock_file/index.html

Module Tezos_stdlib_unix.Lwt_lock_fileSource

Simple abstraction over Unix lockfiles

Sourceval try_with_lock : when_locked:(unit -> 'a Tezos_error_monad.Error_monad.tzresult Lwt.t) -> filename:string -> (unit -> 'a Tezos_error_monad.Error_monad.tzresult Lwt.t) -> 'a Tezos_error_monad.Error_monad.tzresult Lwt.t

try_with_lock ?close_on_exec ?unlink_on_exit ~when_locked ~filename f tries to take a lock on file filename and calls f if the lock was successfully taken. If the lock was previously taken, when_locked is called instead and f is ignored.

This function may fail with an I/O exception wrapped in the error monad if something unexpected happened.

OCaml

Innovation. Community. Security.