re-enabled threads in master process

This commit is contained in:
roberto@goyle
2011-06-23 20:50:14 +02:00
parent e8f5d82b78
commit 8d92261852
3 changed files with 17 additions and 0 deletions
+10
View File
@@ -850,6 +850,14 @@ void uwsgi_python_enable_threads() {
up.swap_ts = threaded_swap_ts;
up.reset_ts = threaded_reset_ts;
uwsgi_log("threads support enabled\n");
}
void uwsgi_python_master_fixup() {
if (uwsgi.has_threads) {
UWSGI_RELEASE_GIL;
}
}
void uwsgi_python_init_thread(int core_id) {
@@ -1087,6 +1095,8 @@ struct uwsgi_plugin python_plugin = {
.init_thread = uwsgi_python_init_thread,
.manage_xml = uwsgi_python_xml,
.master_fixup = uwsgi_python_master_fixup,
.magic = uwsgi_python_magic,
.suspend = uwsgi_python_suspend,