I have this simple Python programm:
from eventlet import wsgi
import eventlet
from eventlet.green import time
def hello_world(env, start_response):
print "got request"
time.sleep(10)
start_response('200 OK', [('Content-Type', 'text/plain')])
return ['Hello, World!\n']
wsgi.server(eventlet.listen(('', 8090)), hello_world)
So when i run it, and open http://localhost:8090/
on my browser multiple times, got request
is only printed after the first request was already processed (after 10 seconds).
It seems like eventlet.wsgi.server
is processing the requests synchronously. But I am using the "green" sleep
. sow how can this happen?
Thank you!