Picos_domain.DLS
Domain-local storage for Picos.
ℹ️ On OCaml 4 there is always only a single domain.
val new_key : (unit -> 'a) -> 'a key
new_key compute
allocates a new key for associating values in storage associated with domains. The initial value for each domain is compute
d by calling the given function if the key
is read before it has been written. The compute
function might be called multiple times per domain, but only one result will be used.
val get : 'a key -> 'a
get key
returns the value associated with the key
in the storage associated with the current domain.
val set : 'a key -> 'a -> unit
set key value
sets the value
associated with the key
in the storage associated with the current domain.