Plasma GitLab Archive
Projects Blog Knowledge

Module Netsys_global

module Netsys_global: sig .. end

Global variables

This module provides a place to store global variables that work across subprocess boundaries. In order to push values to related processes it needs a propagator. The propagator is not included here. The Netplex library implements a propagator that is automatically activated.

Variables are limited to string type.

type variable 
val access : string -> variable

access name: Create or look up a variable with this name

val get : variable -> string

Get the value of the variable (after checking for an update)

val set : variable -> string -> unit

Set the value of the variable

val get_v : variable -> string * int64

Get the value and the version number of the variable

val set_v : variable -> string -> int64

Set the value and get the new version number

val iter : (string -> string -> int64 -> unit) -> unit

iter f: for every variable call f name value version

class type propagator = object .. end
val get_propagator : unit -> propagator option

Get the current propagator or return None

val set_propagator : propagator option -> unit

Set the current propagator to Some p, or remove the propagator with None

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml