sig
type 'a t
val create : 'a -> 'a CCLock.t
val with_lock : 'a CCLock.t -> ('a -> 'b) -> 'b
val try_with_lock : 'a CCLock.t -> ('a -> 'b) -> 'b option
module LockRef :
sig
type 'a t
val get : 'a CCLock.LockRef.t -> 'a
val set : 'a CCLock.LockRef.t -> 'a -> unit
val update : 'a CCLock.LockRef.t -> ('a -> 'a) -> unit
end
val with_lock_as_ref : 'a CCLock.t -> f:('a CCLock.LockRef.t -> 'b) -> 'b
val update : 'a CCLock.t -> ('a -> 'a) -> unit
val update_map : 'a CCLock.t -> ('a -> 'a * 'b) -> 'b
val mutex : 'a CCLock.t -> Mutex.t
val get : 'a CCLock.t -> 'a
val set : 'a CCLock.t -> 'a -> unit
val incr : int CCLock.t -> unit
val decr : int CCLock.t -> unit
val incr_then_get : int CCLock.t -> int
val get_then_incr : int CCLock.t -> int
val decr_then_get : int CCLock.t -> int
val get_then_decr : int CCLock.t -> int
val get_then_set : bool CCLock.t -> bool
val get_then_clear : bool CCLock.t -> bool
end