LOOP: prevent high cpu utilization on no load.

We we passing "0" timeout into poll().

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2010-11-05 09:32:26 +11:00
parent c516965fbb
commit fa57927089

View File

@ -112,7 +112,7 @@ void qb_loop_run(struct qb_loop *l)
if (l->timer_source) {
ms_timeout = qb_loop_timer_msec_duration_to_expire(l->timer_source);
} else {
ms_timeout = 0;
ms_timeout = -1;
}
}
todo += l->fd_source->poll(l->fd_source, ms_timeout);