慕斯王
from gevent import monkeyfrom gevent.pywsgi import WSGIServermonkey.patch_all()from flask import Flaskimport timeapp = Flask(__name__)@app.route('/test',methods=['GET'])def sayHello():time.sleep(10) return 'hello'@app.route('/hi',methods=['GET'])def sayHi():return 'hi'if __name__ =='__main__':http_server = WSGIServer(('', 5000), app)http_server.serve_forever()