[BUG] event pollers must not wait if a task exists in the run queue
Under some circumstances, a task may already lie in the run queue
(eg: inter-task wakeup). It is disastrous to wait for an event in
this case because some processing gets delayed.
diff --git a/src/ev_epoll.c b/src/ev_epoll.c
index 326d5a4..0ce68b0 100644
--- a/src/ev_epoll.c
+++ b/src/ev_epoll.c
@@ -232,7 +232,9 @@
fd_flush_changes();
/* now let's wait for events */
- if (tv_iseternity(exp))
+ if (run_queue)
+ wait_time = 0;
+ else if (tv_iseternity(exp))
wait_time = -1;
else if (tv_isge(&now, exp))
wait_time = 0;