def METHOD_NAME(self, poll: bool):
    """Check the digest of our invalidation Snapshot and exit if it has changed."""
    globs, invalidation_snapshot = self._invalidation_globs_and_snapshot
    assert invalidation_snapshot is not None, "Should have been eagerly initialized in run."
    snapshot = self._get_snapshot(globs, poll=poll)
    if snapshot is None or snapshot.digest == invalidation_snapshot.digest:
        return
    before = set(invalidation_snapshot.files + invalidation_snapshot.dirs)
    after = set(snapshot.files + snapshot.dirs)
    added = after - before
    removed = before - after
    if added or removed:
        description = f"+{added or '{}'}, -{removed or '{}'}"
    else:
        description = f"content changed ({snapshot.digest} fs {invalidation_snapshot.digest})"
    self._logger.critical(
        f"saw filesystem changes covered by invalidation globs: {description}. terminating the daemon."
    )
    self.terminate()