module ThreadLocal: sig .. end
Thread-local variables.
type 'a t
The type of thread-local variables, providing an independent value to
each thread.
val make : 'a -> 'a t
Returns a new thread-local variable whose initial value in each
thread is the passed value.
val get : 'a t -> 'a
Returns the value of the thread-local variable for the current
thread.
val remove : 'a t -> unit
Removes the value of the thread-local variable for the current
thread. The variable can still be set or get. If no set occurs
between remove and get, the variable is reinitialized with the
value originally passed to make.
val set : 'a t -> 'a -> unit
Modifies the value of the thread-local variable for the current
thread.