Moonpool_private.Thread_local_storage_Thread local storage
A TLS key for values of type 'a. This allows the storage of a single value of type 'a per thread.
val new_key : (unit -> 'a) -> 'a keyAllocate a new, generative key. When the key is used for the first time on a thread, the function is called to produce it.
This should only ever be called at toplevel to produce constants, do not use it in a loop.
val get : 'a key -> 'aGet the value for the current thread.
val set : 'a key -> 'a -> unitSet the value for the current thread.