package async

  1. Overview
  2. Docs
Monadic concurrency library

Install

Dune Dependency

Authors

Maintainers

Sources

async-v0.12.0.tar.gz
sha256=c1cd9fa74e975ae5a014dffb36283d2616d89e465a9d4dec3062da70866ed28f
md5=e9a06695c63cf4b092cc81f25a8491fd

doc/async.lock_file_async/Lock_file_async/Flock/index.html

Module Lock_file_async.Flock

type t

Nfs has analogues of functions in Lock_file.Flock; see there for documentation. In addition to adding Deferreds, this module adds functions that operate in the Deferred.Or_error.t monad.

val lock_exn : lock_path:string -> [ `Somebody_else_took_it | `We_took_it of t ] Async.Deferred.t
val lock : lock_path:string -> [ `Somebody_else_took_it | `We_took_it of t ] Async.Deferred.Or_error.t
val unlock_exn : t -> unit Async.Deferred.t
val unlock : t -> unit Async.Deferred.Or_error.t
val wait_for_lock_exn : ?abort:unit Async.Deferred.t -> lock_path:string -> unit -> t Async.Deferred.t

wait_for_lock_exn ?abort ~lock_path () Wait for the lock, giving up once abort becomes determined

val wait_for_lock : ?abort:unit Async.Deferred.t -> lock_path:string -> unit -> t Async.Deferred.Or_error.t

See wait_for_lock_exn

OCaml

Innovation. Community. Security.