fixed threading in multiple apps

This commit is contained in:
roberto@oneiric64
2011-12-12 17:41:49 +01:00
parent 8f792fde2d
commit eefe5048b2
4 changed files with 45 additions and 5 deletions
+3
View File
@@ -1097,6 +1097,9 @@ void uwsgi_python_enable_threads() {
up.gil_get = gil_real_get;
up.gil_release = gil_real_release;
up.swap_ts = simple_threaded_swap_ts;
up.reset_ts = simple_threaded_reset_ts;
if (uwsgi.threads > 1) {
up.swap_ts = threaded_swap_ts;
up.reset_ts = threaded_reset_ts;