From e3c9b2c0bf6d3f610df52bedb743ea616a51e934 Mon Sep 17 00:00:00 2001 From: "roberto@debian32" Date: Sat, 25 Jun 2011 07:58:40 +0200 Subject: [PATCH] cheap+idle+lazy improved for threading --- master_utils.c | 2 +- plugins/python/pyutils.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/master_utils.c b/master_utils.c index 47fdce1f..63b880e3 100644 --- a/master_utils.c +++ b/master_utils.c @@ -53,7 +53,7 @@ int uwsgi_respawn_worker(int wid) { uwsgi.workers[uwsgi.mywid].last_spawn = uwsgi.current_time; uwsgi.workers[uwsgi.mywid].manage_next_request = 1; - if (uwsgi.master_process && uwsgi.workers[uwsgi.mywid].respawn_count > 1) { + if (uwsgi.master_process && (uwsgi.workers[uwsgi.mywid].respawn_count || uwsgi.cheap)) { for (i = 0; i < 0xFF; i++) { if (uwsgi.p[i]->master_fixup) { uwsgi.p[i]->master_fixup(1); diff --git a/plugins/python/pyutils.c b/plugins/python/pyutils.c index 0491309e..6bebc625 100644 --- a/plugins/python/pyutils.c +++ b/plugins/python/pyutils.c @@ -12,11 +12,11 @@ PyObject *python_call(PyObject *callable, PyObject *args, int catch) { PyObject *pyret; - uwsgi_log("ready to call %p %p\n", callable, args); + //uwsgi_log("ready to call %p %p\n", callable, args); pyret = PyEval_CallObject(callable, args); - uwsgi_log("called\n"); + //uwsgi_log("called\n"); if (PyErr_Occurred()) { if (PyErr_ExceptionMatches(PyExc_MemoryError)) {