class

X::Engine::LinkRegistry

Inherits Reference / Object

Manages bidirectional links between processes When a linked process dies, all linked processes receive exit signals

Constants

Log = ::Log.for(self)

Constructors

Instance methods

cleanup(process_id : UInt64) : Tuple(Array(UInt64), Array(Process::MonitorReference))

Clean up all links and monitors for a process that has exited Returns tuple of (linked_processes, monitor_refs_to_notify)

Source
demonitor(ref : Process::MonitorReference) : Bool

Remove a monitor by reference

Source
get_monitors(watcher : UInt64) : Array(Process::MonitorReference)

Get all monitor refs for processes that watcher is monitoring

Source
get_watchers(watched : UInt64) : Array(Process::MonitorReference)

Get all monitor refs for processes monitoring watched

Source
linked?(pid1 : UInt64, pid2 : UInt64) : Bool

Check if two processes are linked

Source
monitor(watcher : UInt64, watched : UInt64) : Process::MonitorReference

Create a unidirectional monitor from watcher to watched Returns a Process::MonitorReference that can be used to demonitor

Source
trap_exit(process_id : UInt64, enable : Bool = true)

Enable trap_exit for a process When enabled, exit signals become messages instead of killing the process

Source
traps_exit?(process_id : UInt64) : Bool

Check if a process traps exits

Source