package qcow

  1. Overview
  2. Docs
val with_lock : ?client:Client.t -> t -> (unit -> 'a Lwt.t) -> 'a Lwt.t

with_lock ?client t f executes f () when no other client has held the lock exclusively for writing. Note this means that I may hold the lock for writing and then re-lock it for reading.

val lock : ?client:Client.t -> t -> lock Lwt.t

lock ?client t locks t. This function blocks while another client holds the lock for writing. The lock must be released with unlock

OCaml

Innovation. Community. Security.