From 232f3470b3dac465e4ad0c457942fca6a307d155 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 8 Jun 2021 09:09:10 -0400 Subject: [PATCH] TT#14008 wake up only one timer thread When a new timer object is scheduled to run in the future, we only need to wake up one thread to notify about the new object as only one thread is needed to handle it. The other threads can remain in the previous sleep state. Change-Id: I92ccec61a6c5a4a3cea5c5428c85f83707cf4d64 --- daemon/timerthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/timerthread.c b/daemon/timerthread.c index 136ff7f6c..2e3e358d1 100644 --- a/daemon/timerthread.c +++ b/daemon/timerthread.c @@ -83,7 +83,7 @@ void timerthread_obj_schedule_abs_nl(struct timerthread_obj *tt_obj, const struc obj_hold(tt_obj); /* if it wasn't removed, we make a new reference */ tt_obj->next_check = *tv; g_tree_insert(tt->tree, tt_obj, tt_obj); - cond_broadcast(&tt->cond); + cond_signal(&tt->cond); } void timerthread_obj_deschedule(struct timerthread_obj *tt_obj) {