`sig type lock val create : enter:(unit -> unit) -> leave:(unit -> unit) -> BatConcurrent.lock val nolock : BatConcurrent.lock val synchronize : (unit -> BatConcurrent.lock) -> ('a -> 'b) -> 'a -> 'b val sync : BatConcurrent.lock -> ('a -> 'b) -> 'a -> 'b val compose : BatConcurrent.lock -> BatConcurrent.lock -> BatConcurrent.lock module type BaseLock = sig type t val create : unit -> BatConcurrent.BaseLock.t val lock : BatConcurrent.BaseLock.t -> unit val unlock : BatConcurrent.BaseLock.t -> unit val try_lock : BatConcurrent.BaseLock.t -> bool end module type Lock = sig type t val create : unit -> BatConcurrent.Lock.t val lock : BatConcurrent.Lock.t -> unit val unlock : BatConcurrent.Lock.t -> unit val try_lock : BatConcurrent.Lock.t -> bool val synchronize : ?lock:BatConcurrent.Lock.t -> ('a -> 'b) -> 'a -> 'b val make : unit -> BatConcurrent.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 : Lock end`