From c2cf1f3a622994402880ecaa8d3fbe93099cf3ca Mon Sep 17 00:00:00 2001 From: "roberto@quantal64" Date: Fri, 14 Sep 2012 15:52:23 +0200 Subject: [PATCH] fixed threading + lazy --- plugins/python/python_plugin.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index c2041425..0539a9f5 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -1050,6 +1050,11 @@ void uwsgi_python_init_apps() { struct http_status_codes *http_sc; + // lazy ? + if (uwsgi.mywid > 0) { + UWSGI_GET_GIL; + } + #ifndef UWSGI_PYPY // prepare for stack suspend/resume if (uwsgi.async > 1) { @@ -1170,6 +1175,11 @@ next: } } + // lazy ? + if (uwsgi.mywid > 0) { + UWSGI_RELEASE_GIL; + } + } void uwsgi_python_master_fixup(int step) {