INNER CODE UNIT · Python

_read_loop

browser-use/bux · agent/box_agent.py:501

	async def _read_loop(self) -> None:
		import base64

		assert self._fd is not None and self._pid is not None
		loop = asyncio.get_event_loop()
		try:
			while True:
				ready = await loop.run_in_executor(
					None, lambda: select.select([self._fd], [], [], 1.0)[0]
				)
				if ready:
					try:
						chunk = os.read(self._fd, 4096)
					except (BlockingIOError, OSError):
						chunk = b''
					if not chunk:
						break
					await self._on_event(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…