Imandrakit_sync.ImmlockLock with fast read path for immutable data
A lock for immutable data. Thread safe.
Reading is really fast (one atomic read), writing is serialized using a mutex.
val create : 'a -> 'a tval get : 'a t -> 'aRead
val update : 'a t -> ('a -> 'a) -> unitupdate l f replaces the content x of l with f x, atomically.
val update_map : 'a t -> ('a -> 'a * 'b) -> 'bupdate_map l f computes x', y = f (get l), then puts x' in l and returns y.
val pp : 'a Imandrakit.Fmt.printer -> 'a t Imandrakit.Fmt.printer