fix multiple python mountpoints with multiple threads in cow mode

This commit is contained in:
Unbit
2014-08-26 07:11:21 +02:00
parent 92bd4122cc
commit 59a999af7b
2 changed files with 12 additions and 1 deletions
+4
View File
@@ -949,12 +949,16 @@ int uwsgi_python_mount_app(char *mountpoint, char *app) {
if (strchr(app, ':') || uwsgi_endswith(app, ".py") || uwsgi_endswith(app, ".wsgi")) {
uwsgi.wsgi_req->appid = mountpoint;
uwsgi.wsgi_req->appid_len = strlen(mountpoint);
// lazy ?
if (uwsgi.mywid > 0) UWSGI_GET_GIL
if (uwsgi.single_interpreter) {
id = init_uwsgi_app(LOADER_MOUNT, app, uwsgi.wsgi_req, up.main_thread, PYTHON_APP_TYPE_WSGI);
}
else {
id = init_uwsgi_app(LOADER_MOUNT, app, uwsgi.wsgi_req, NULL, PYTHON_APP_TYPE_WSGI);
}
// lazy ?
if (uwsgi.mywid > 0) UWSGI_RELEASE_GIL
return id;
}
return -1;