From aca4dbfbe76f1440a0a95e2a455329c14fd8855f Mon Sep 17 00:00:00 2001 From: "roberto@precise64" Date: Mon, 12 Mar 2012 14:54:59 +0100 Subject: [PATCH] fixed threading rpc --- plugins/python/uwsgi_pymodule.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c index 5129fadb..011aef56 100644 --- a/plugins/python/uwsgi_pymodule.c +++ b/plugins/python/uwsgi_pymodule.c @@ -312,7 +312,9 @@ PyObject *py_uwsgi_call(PyObject * self, PyObject * args) { argvs[i] = PyString_Size(py_str); } + UWSGI_RELEASE_GIL; char *response = uwsgi_do_rpc(NULL, func, argc - 1, argv, argvs, &size); + UWSGI_GET_GIL; if (size > 0) { PyObject *ret = PyString_FromStringAndSize(response, size); @@ -381,7 +383,9 @@ PyObject *py_uwsgi_rpc(PyObject * self, PyObject * args) { argvs[i] = PyString_Size(py_str); } + UWSGI_RELEASE_GIL; char *response = uwsgi_do_rpc(node, func, argc - 2, argv, argvs, &size); + UWSGI_GET_GIL; if (size > 0) { PyObject *ret = PyString_FromStringAndSize(response, size);