Batteries_uni.Concurrent

`sig
type lock = BatConcurrent.lock
val create : enter:(unit -> unit) -> leave:(unit -> unit) -> lock
val nolock : lock
val synchronize : (unit -> lock) -> ('a -> 'b) -> 'a -> 'b
val sync : lock -> ('a -> 'b) -> 'a -> 'b
val compose : lock -> lock -> lock
module type BaseLock =
sig
type t
val create : unit -> t
val lock : t -> unit
val unlock : t -> unit
val try_lock : t -> bool
end
module type Lock =
sig
type t
val create : unit -> t
val lock : t -> unit
val unlock : t -> unit
val try_lock : t -> bool
val synchronize : ?lock:t -> ('a -> 'b) -> 'a -> 'b
val make : unit -> lock
end
module MakeLock :
functor (M : BaseLock) ->
sig
type t = M.t
val create : unit -> t
val lock : t -> unit
val unlock : t -> unit
val try_lock : t -> bool
val synchronize : ?lock:t -> ('a -> 'b) -> 'a -> 'b
val make : unit -> lock
end
module NoLock :
sig
type t = BatConcurrent.NoLock.t
val create : unit -> t
val lock : t -> unit
val unlock : t -> unit
val try_lock : t -> bool
val synchronize : ?lock:t -> ('a -> 'b) -> 'a -> 'b
val make : unit -> lock
end
end`