From: Olivier Houchard Date: Thu, 3 Oct 2019 12:55:34 +0000 (+0200) Subject: BUG/MEDIUM: tasks: Don't forget to decrement tasks_run_queue. X-Git-Tag: v2.1-dev3~151 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=07308677ddcc7f47567a98f51ad0c0bd0e3a49a0;p=haproxy.git BUG/MEDIUM: tasks: Don't forget to decrement tasks_run_queue. When executing tasks, don't forget to decrement tasks_run_queue once we popped one task from the task_list. tasks_run_queue used to be decremented by __tasklet_remove_from_tasklet_list(), but we now call MT_LIST_POP(). --- diff --git a/src/task.c b/src/task.c index 0d818711e..9ac02117b 100644 --- a/src/task.c +++ b/src/task.c @@ -393,6 +393,7 @@ void process_runnable_tasks() t = (struct task *)MT_LIST_POP(&tt->task_list, struct tasklet *, list); if (!t) break; + _HA_ATOMIC_SUB(&tasks_run_queue, 1); state = _HA_ATOMIC_XCHG(&t->state, TASK_RUNNING); __ha_barrier_atomic_store();