def __init__(self, node): Process.__init__(self, node.node_name_, passive=False) self.node = node self.node_name = self.node.node_name_.split("@")[0] self.node.register_name(self, Atom(self.node_name)) self.i = 0 print("Registering process - {0}".format(self.node.node_name_))
def exit(self, reason=None): LOG.info("TestMonitorProcess: Received EXIT(%s)" % reason) node = self.get_node() # # 3. End, sending a stop message # LOG.info(color("Stopping remote loop", fg="red")) node.send(sender=self.pid_, receiver=remote_receiver_name(), message=(Atom("example5"), Atom("stop"))) LOG.error("Done") Process.exit(self, reason)
def exit(self, reason=None): LOG.info("TestLinkProcess: Received EXIT(%s)" % reason) node = self.get_node() # # 2. Create a process P2 # Send pid of P2 to remote process example5 and it will monitor P3 and # then will send an exit signal. # p2 = TestMonitorProcess() LOG.info("Sending {example5, test_monitor, %s} to remote 'example5'" % p2.pid_) node.send(sender=p2.pid_, receiver=remote_receiver_name(), message=(Atom("example5"), Atom("test_monitor"), p2.pid_)) Process.exit(self, reason)
def exit(self, reason=None): logging.error(reason) Process.exit(self, reason)
def __init__(self, node) -> None: Process.__init__(self, node_name=node.node_name_) node.register_name(self, Atom('mailbox'))
def __init__(self) -> None: Process.__init__(self) self.get_node().register_name(self, Atom('my_process')) # optional LOG.info("Registering process - 'my_process'")
def __init__(self) -> None: Process.__init__(self)
def exit(self, reason=None): # # 1.2. Exiting remote linked process should also exit this process # LOG.info("LinkExample6: Received EXIT(%s)" % reason) Process.exit(self, reason)
def __init__(self, node) -> None: Process.__init__(self, node_name=node.node_name_)
def exit(self, reason=None): LOG.info("MyProcess: Received EXIT(%s)" % reason) #node = self.get_node() Process.exit(self, reason)
def __init__(self, node) -> None: Process.__init__(self, node_name=node.node_name_) node.register_name(self, Atom('my_process')) # optional LOG.info("Registering process - 'my_process'")