Using Gevent in flask: API is not asynchronous

后端 未结 3 2049
死守一世寂寞
死守一世寂寞 2021-01-15 23:16

Earlier I was using Waitress. Now I\'m using Gevent to run my Flask app that has only one API

from flask import Flask, request, jsonify
import documentUtil
fr         


        
3条回答
  •  生来不讨喜
    2021-01-15 23:40

    Not sure, however I think adding thread param in server object can solve the problem.

    http_server = WSGIServer(('127.0.0.1', 8000), app, numthreads=50)

    source: https://f.gallai.re/wsgiserver

提交回复
热议问题