package parany

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A domain/thread private store

type 'a store

the type of such a store

val create : (unit -> 'a) -> 'a store

create (fun () -> zero_elt) create an empty store. For typing reasons, you need to pass a function which returns an example element if applied.

val set : 'a store -> 'a -> unit

set store x put x in the store for the current domain, so that it can be retrieved later on.

val get : 'a store -> 'a

get store retrieve something from the store for the current domain.

  • raises Not_found

    if the current domain/thread has not called set previously.