package async

  1. Overview
  2. Docs
Monadic concurrency library

Install

Dune Dependency

Authors

Maintainers

Sources

async-v0.13.0.tar.gz
sha256=fef9ebe342ea59d7804f6292b7891ad664a8ba8d4174a1b202db91363a9c71ab
md5=fbfc7059179bc9ddd5dc1411e7d2e815

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

Module Lock_file_async.Symlink

type t

Symlink has async analogues of functions in Lock_file_blocking.Symlink; see there for documentation.

Additionally, here we:

  • catch unix exceptions, packaging them as Deferred.Or_error.t
  • implement abortable waiting versions based on polling
val lock_exn : lock_path:string -> metadata:string -> [ `Somebody_else_took_it of string Core.Or_error.t | `We_took_it of t ] Async.Deferred.t
val lock : lock_path:string -> metadata:string -> [ `Somebody_else_took_it of string Core.Or_error.t | `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 -> metadata: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 -> metadata:string -> unit -> t Async.Deferred.Or_error.t

See wait_for_lock_exn

OCaml

Innovation. Community. Security.