(self)
| 209 | |
| 210 | # ── internal: stream raw output into the queue ──────────────────── |
| 211 | async def _pump_stdout(self): |
| 212 | if self._proc is None: |
| 213 | raise RuntimeError("TTYSpawn is not started") |
| 214 | reader = self._proc.stdout |
| 215 | while True: |
| 216 | chunk = await reader.read(4096) # grab whatever is ready # type: ignore |
| 217 | if not chunk: |
| 218 | break |
| 219 | self._buf.put_nowait(chunk.decode(self.encoding, "replace")) |
| 220 | |
| 221 | |
| 222 | # ──────────────────────────── POSIX IMPLEMENTATION ──────────────────── |