INNER CODE UNIT · Python

mark_done

MakazhanAlpamys/Soup · src/soup_cli/ui/app.py:220

    def mark_done(self) -> None:
        with self._new_line_cond:
            self._done = True
            self._new_line_cond.notify_all()

    def is_done(self) -> bool:
        with self._lock:
            return self._done

    def get_lines_from(self, start_idx: int) -> list[tuple[int, str]]:
        with self._lock:
            return [item for item in self._lines if item[0] >= start_idx]

    def wait_for_lines_or_done(
        self, next_idx: int, timeout: float = 0.5
    ) -> tuple[list[tuple[int, str]], bool]:
        """Wait until lines >= next_idx are available or process is marked done."""
        with self._new_line_cond:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…