Module Qcow_locks.Read
val with_lock : ?client:Client.t -> t -> Qcow_types.Cluster.t -> (unit -> 'a Lwt.t) -> 'a Lwt.t
with_lock t f
executesf ()
with the lock held for reading
val with_locks : ?client:Client.t -> t -> first:Qcow_types.Cluster.t -> last:Qcow_types.Cluster.t -> (unit -> 'a Lwt.t) -> 'a Lwt.t
with_locks t ~first ~last f
executesf ()
with all clusters in the intervalfirst .. last
inclusive locked for reading.
val lock : ?client:Client.t -> t -> Qcow_types.Cluster.t -> lock Lwt.t
lock t cluster
acquire a non-exclusive read lock oncluster
. The resulting lock must be released by callingunlock