Blocking calls with Gevent and WSGI
问题 I've just started working with coroutines and have read up on gevent and greenlets. For a test I served this code through gevents pywsgi module: from gevent.pywsgi import WSGIServer import gevent def hello_world(env, start_response): gevent.sleep(5) start_response('200 OK', [('Content-Type', 'text/html')]) return ["<b>hello world</b>"] print 'Serving on 8088...' WSGIServer(('127.0.0.1', 8888), hello_world).serve_forever() I expected a result where every request would get a 5 second delay