better GIL usage

This commit is contained in:
roberto@precise64
2012-03-21 20:21:51 +01:00
parent 4117dd91fc
commit 0fc74dac4d
4 changed files with 1 additions and 19 deletions
-5
View File
@@ -185,8 +185,6 @@ int uwsgi_response_subhandler_pump(struct wsgi_request *wsgi_req) {
struct http_status_codes *http_sc;
char sc[4];
UWSGI_GET_GIL
// ok its a yield
if (!wsgi_req->async_placeholder) {
if (PyDict_Check((PyObject *)wsgi_req->async_result)) {
@@ -339,7 +337,6 @@ int uwsgi_response_subhandler_pump(struct wsgi_request *wsgi_req) {
}
#ifdef UWSGI_ASYNC
if (uwsgi.async > 1) {
UWSGI_RELEASE_GIL
return UWSGI_AGAIN;
}
#endif
@@ -371,7 +368,6 @@ int uwsgi_response_subhandler_pump(struct wsgi_request *wsgi_req) {
Py_DECREF(pychunk);
UWSGI_RELEASE_GIL
return UWSGI_AGAIN;
clear:
@@ -380,7 +376,6 @@ clear:
Py_DECREF((PyObject *)wsgi_req->async_result);
PyErr_Clear();
UWSGI_RELEASE_GIL
return UWSGI_OK;
}