Module PrettyPrintable.MakeConcurrentMap

a simple thread safe map that uses an atomic reference to a persistent map plus a mutex to sequentialize updates

Parameters

module Map : Stdlib.Map.S

Signature

type key = Map.key
type 'a t
val empty : unit -> 'a t
val clear : 'a t -> unit
val add : 'a t -> key -> 'a -> unit
val filter : 'a t -> (key -> 'a -> bool) -> unit
val find_opt : 'a t -> key -> 'a option
val remove : 'a t -> key -> unit