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) {