mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
BUG/MEDIUM: tasks: Don't insert in the global rqueue if nbthread == 1
Make sure we don't insert a task in the global run queue if nbthread == 1, as, as an optimisation, we avoid reading from it if nbthread == 1.
This commit is contained in:
parent
5c110b924e
commit
d8b7a4701d
@ -395,7 +395,8 @@ void process_runnable_tasks()
|
||||
state = HA_ATOMIC_AND(&t->state, ~TASK_RUNNING);
|
||||
if (state)
|
||||
#ifdef USE_THREAD
|
||||
__task_wakeup(t, (t->thread_mask == tid_bit) ?
|
||||
__task_wakeup(t, (t->thread_mask == tid_bit ||
|
||||
global.nbthread == 1) ?
|
||||
&rqueue_local[tid] : &rqueue);
|
||||
#else
|
||||
__task_wakeup(t, &rqueue_local[tid]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user