MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk / _fail_all

Method _fail_all

python/src/cmdop/_transport.py:209–218  ·  view source on GitHub ↗

EOF / crash: fail every in-flight call.

(self, exc: Exception)

Source from the content-addressed store, hash-verified

207 return map_core_error(info.code or "internal", info.message or "")
208
209 def _fail_all(self, exc: Exception) -> None:
210 """EOF / crash: fail every in-flight call."""
211 pending, self._pending = self._pending, {}
212 for p in pending.values():
213 if isinstance(p, _UnaryPending):
214 if not p.fut.done():
215 p.fut.set_exception(exc)
216 else:
217 p.queue.put_nowait(exc)
218 p.queue.put_nowait(_STREAM_END)
219
220 async def aclose(self) -> None:
221 """Close stdin (graceful drain), reap the child, cancel the read loop."""

Callers 2

_read_loopMethod · 0.95
acloseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected