Module Messaging

Low-level handling of messages between the supervisor and the engines of an analysis.

Engines run in domains of a single process; a message is an OCaml value dropped into the in-memory mailbox of the receiver, without any serialization. There are no background threads: sending is a mutex-protected queue operation and S.recv drains the mailbox of the calling domain without blocking. S.wait_for_message blocks until the mailbox of the calling domain is not empty, so that a domain with nothing to do until the next message does not have to poll.

exception NotInitialized
module type RelayMessage = sig ... end

A message to be relayed to other processes

module type S = sig ... end
module Make (T : RelayMessage) : S with type relay_message = T.t

Functor to instantiate the messaging system with a type of messages