MCPcopy Create free account
hub / github.com/apache/thrift / stop

Method stop

lib/py/src/server/TNonblockingServer.py:288–301  ·  view source on GitHub ↗

Stop the server. This method causes the serve() method to return. stop() may be invoked from within your handler, or from another thread. After stop() is called, serve() will return but the server will still be listening on the socket. serve() may then be called a

(self)

Source from the content-addressed store, hash-verified

286 self._write.send(b'1')
287
288 def stop(self):
289 """Stop the server.
290
291 This method causes the serve() method to return. stop() may be invoked
292 from within your handler, or from another thread.
293
294 After stop() is called, serve() will return but the server will still
295 be listening on the socket. serve() may then be called again to resume
296 processing requests. Alternatively, close() may be called after
297 serve() returns to close the server socket and shutdown all worker
298 threads.
299 """
300 self._stop = True
301 self.wake_up()
302
303 def _select(self):
304 """Does select on open connections."""

Callers 1

close_serverMethod · 0.45

Calls 1

wake_upMethod · 0.95

Tested by

no test coverage detected