等待结束信号

def _check_alive(self) -> Generator[Any, None, None]:
        """
        等待结束信号
        """
        if self.loop is None:
            return
        pid = os.getpid()
        try:
            while self.alive:  # type: ignore
                self.notify()

                if pid == os.getpid() and self.ppid != os.getppid():
                    self.alive = False
                    self.log.info("Parent changed, shutting down: %s", self)
                else:
                    yield from asyncio.sleep(1.0, loop=self.loop)
        except (Exception, BaseException, GeneratorExit, KeyboardInterrupt):
            pass
        yield from self.close()