From 86d9b4bc0ec204e666e8a4762ddfff0d07551598 Mon Sep 17 00:00:00 2001 From: Roberto De Ioris Date: Thu, 18 Oct 2012 08:27:51 +0200 Subject: [PATCH] always get gil on python atexit --- plugins/python/python_plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index 0ca3d6a8..bc540144 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -302,8 +302,9 @@ realstuff: return; } - if (uwsgi.has_threads) - PyGILState_Ensure(); + // always call it + PyGILState_Ensure(); + // no need to worry about freeing memory #ifdef UWSGI_EMBEDDED PyObject *uwsgi_dict = get_uwsgi_pydict("uwsgi");