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)
| 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 |
no test coverage detected