gevent fixes

This commit is contained in:
roberto@precise64
2012-03-28 11:08:04 +02:00
parent f6b9345716
commit 57d4cd9fc9
2 changed files with 5 additions and 1 deletions
+5
View File
@@ -1,10 +1,15 @@
import uwsgi
if uwsgi.loop == 'gevent':
import gevent
print uwsgi.version
print uwsgi.workers()
uwsgi.cache_set('foo', "Hello World from cache")
def application(env, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
yield "foobar<br/>"
if uwsgi.loop == 'gevent':
gevent.sleep(10)
yield str(env['wsgi.input'].fileno())
yield "<h1>Hello World</h1>"
yield uwsgi.cache_get('foo')
-1
View File
@@ -107,7 +107,6 @@ PyObject *py_uwsgi_gevent_main(PyObject * self, PyObject * args) {
// accept the connection
if (wsgi_req_simple_accept(wsgi_req, uwsgi.sockets->fd)) {
uwsgi_close_request(wsgi_req);
free_req_queue;
goto clear;
}