Module Rml_process_manager

module Rml_process_manager: sig .. end

Process management combinators.

type ident 

Type of the process identifier.

val ps : unit -> unit

Display the list of running processes with their behaviors:

val killable : 'a process -> 'a option process

run killable p associates an id to the process p and executes it. The execution of this process can be stopped by the emission of its id on the signal kill. If the execution of p terminates with the value v, then run killable p returns Some v. If If the execution of p is aborted, the value None is returned.

val kill : (int, ident list) event

Signal gathering the killing orders.

val suspendable : 'a process -> 'a process

run suspendable p associates an id to the process p and executes it. The execution of this process can be suspended and then resumed by the emission of its id on the signal sr.

val sr : (int, ident list) event

Signal gathering the suspension and resumption orders.

val resetable : 'a process -> 'a process

run resetable p associates an id to the process p and executes it. The execution of this process can be reset by the emission of its id on the signal reset.

val reset : (int, ident list) event

Signal gathering the reseting orders.

val changeable : ('a, (int * ('state -> unit process)) list) event ->
('state -> unit process) -> 'state -> unit process

run changeable change p state associates an id to the process (p state) and executes it. The behavior process can be changed by emitting a new process on the signal change. The state state is transnited to the new process.

val extensible : ('a, (int * ('state -> unit process)) list) event ->
('state -> unit process) -> 'state -> unit process

run extensible add p state associates an id to the process (p state) and executes it. New processes sharing the state state can be executed in parallel to (p state) by send their definition on the signal add.