MCPcopy Create free account
hub / github.com/ActiveState/code / _onSend

Method _onSend

recipes/Python/578488_Threaded/recipe-578488.py:57–72  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

55 self._in.pop(requestId).put(result)
56
57 def _onSend(self, item):
58 (deferredResult, command) = item
59 requestId = None
60 if deferredResult:
61 requestId = self._next()
62 self._in[requestId] = deferredResult
63
64 try:
65 self._write(requestId, command)
66 except StopIteration as e:
67 self._shutdown()
68 if deferredResult:
69 self._notify(requestId, e)
70 except Exception as e:
71 if deferredResult:
72 self._notify(requestId, e)
73
74 def _onReceive(self, item):
75 if item == self._readSentinel:

Callers

nothing calls this directly

Calls 4

_shutdownMethod · 0.95
_notifyMethod · 0.95
_nextMethod · 0.45
_writeMethod · 0.45

Tested by

no test coverage detected