async def __process_remote_watch_message_in_connected_state(self, msg): if msg.watcher.id in self._watched: self._watched[msg.watcher.id].append(msg.watchee) else: self._watched[msg.watcher.id] = [msg.watchee] await Remote().send_message(msg.watchee, Watch(watcher=msg.watcher), -1)
async def watch(self, pid: PID) -> None: await pid.send_system_message(Watch(watcher=self.my_self))
async def poison_future(self, pid: PID) -> Future: future = FutureProcess() await pid.send_system_message(Watch(watcher=future.pid)) await self.poison(pid) return future.task