MCPcopy Create free account
hub / github.com/microsoft/debugpy / close

Method close

src/debugpy/common/messaging.py:1125–1137  ·  view source on GitHub ↗

Closes the underlying stream. This does not immediately terminate any handlers that are already executing, but they will be unable to respond. No new request or event handlers will execute after this method is called, even for messages that have already been received

(self)

Source from the content-addressed store, hash-verified

1123 self._lock.release()
1124
1125 def close(self):
1126 """Closes the underlying stream.
1127
1128 This does not immediately terminate any handlers that are already executing,
1129 but they will be unable to respond. No new request or event handlers will
1130 execute after this method is called, even for messages that have already been
1131 received. However, response handlers will continue to executed for any request
1132 that is still pending, as will any handlers registered via on_response().
1133 """
1134 with self:
1135 if not self._closed:
1136 self._closed = True
1137 self.stream.close()
1138
1139 def start(self):
1140 """Starts a message loop which parses incoming messages and invokes handlers

Callers 2

_run_handlersMethod · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected