package qcow

  1. Overview
  2. Docs
type t

A set of per-cluster read and write locks

val make : unit -> t

Create a set of locks

type lock

A value which represents holding a lock

val unlock : lock -> unit

unlock lock releases the lock. Note releasing the same lock more than once will trigger a runtime failure.

module Client : sig ... end
module Read : sig ... end

Non-exclusive read locks

module Write : sig ... end

Exclusive write locks

val with_metadata_lock : t -> (unit -> 'a Lwt.t) -> 'a Lwt.t

with_metadata_lock t f executes f () with the global metadata lock held. This prevents metadata blocks from moving while they're being used.

module Debug : sig ... end
OCaml

Innovation. Community. Security.