Browse Source

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
pull/1287/head
Richard Fuchs 5 years ago
parent
commit
232f3470b3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      daemon/timerthread.c

+ 1
- 1
daemon/timerthread.c View File

@ -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 */ obj_hold(tt_obj); /* if it wasn't removed, we make a new reference */
tt_obj->next_check = *tv; tt_obj->next_check = *tv;
g_tree_insert(tt->tree, tt_obj, tt_obj); 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) { void timerthread_obj_deschedule(struct timerthread_obj *tt_obj) {


Loading…
Cancel
Save