From: Olivier Houchard Date: Mon, 28 May 2018 12:54:49 +0000 (+0200) Subject: BUG/MEDIUM: task: Don't forget to decrement max_processed after each task. X-Git-Tag: v1.9-dev1~234 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=736ea41c6c8dcb088a6d2bb8841f13c5c92d06d9;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: task: Don't forget to decrement max_processed after each task. When the task list was introduced, we bogusly lost max_processed--, that means we would execute as much tasks as present in the list, and we would never set active_tasks_mask, so the thread would go to sleep even if more tasks were to be executed. 1.9-dev only, no backport is needed. --- diff --git a/src/task.c b/src/task.c index 3275188969..25ffe21db2 100644 --- a/src/task.c +++ b/src/task.c @@ -367,6 +367,7 @@ void process_runnable_tasks() task_queue(t); } + max_processed--; if (max_processed <= 0) { active_tasks_mask |= tid_bit; activity[tid].long_rq++;