March Docs

GlobalPid

GlobalPid: a serializable, cluster-wide process handle (P1 L4 prerequisite).

Location-transparent send/cast/call need a process identity that survives the wire. A global Pid is {NodeId, local_pid, creation}: the owning node, the node-local scheduler pid (the runtime's integer PID), and a creation counter that distinguishes a restarted node's reused local pids from the originals (so a stale Pid from before a restart is detectably stale). It round-trips through MessagePack to ride inside a NetFrame.

Types

typePidPid = { node_id : String, local_pid : Int, creation : Int }#

Functions

fndecodedecode(bytes : List(Int)) : Result(Pid, String)#
fnencodeencode(p : Pid) : List(Int) do Msgpack.encode(to_value(p)) end#
fneqeq(a : Pid, b : Pid) : Bool#
fnmakemake(node_id : String, local_pid : Int, creation : Int) : Pid#
fnof_valueof_value(v) : Result(Pid, String)#
fnto_valueto_value(p : Pid)#