单进程:
server = HTTPServer(app)
server.listen(8888)
IOLoop.instance().start()
多进程,方案1:
server = HTTPServer(app)
server.bind(8888)
server.start(0) # Forks multiple sub-processes
IOLoop.instance().start()
多进程,方案2:
sockets = tornado.netutil.bin[......]
Tornado多进程启动的2种方法
Leave a reply