INNER CODE UNIT · Python

append

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

    def append(self, text: str) -> None:
        with self._new_line_cond:
            idx = self._total_emitted
            self._total_emitted += 1
            self._lines.append((idx, text))
            if len(self._lines) > self._maxlen:
                self._lines.pop(0)
            self._new_line_cond.notify_all()

    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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…