thrift - Shutdown a TThreadPoolServer in python -
i want know how shutdown tthreadpoolserver
properly. right use following python code:
try: # other settings transport = tsocket.tserversocket(port=server_port) server = tserver.tthreadpoolserver(processor, transport, tfactory, pfactory) print("starting server...") server.serve() except (systemexit, keyboardinterrupt): transport.close() print("done.!") exit(0)
after server started using terminal, press control-c
, "done.!" printed on screen, doesn't exit , go command line. can this? if use tsimpleserver
, terminated , go command line.
don't need .stop()
server
?
Comments
Post a Comment