Wake_expired_tasks is supposed to return a date, not an interval. It
was causing busy loops in pollers.
if (likely(timer_wq.data != NULL)) {
task = LIST_ELEM(timer_wq.data, struct task *, qlist);
if (likely(tv_isgt(&task->expire, &now))) {
- tv_remain(&now, &task->expire, next);
+ *next = task->expire;
return;
}
}
task = LIST_ELEM(data, struct task *, qlist);
if (tv_isgt(&task->expire, &now)) {
- tv_remain(&now, &task->expire, next);
+ *next = task->expire;
break;
}