[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_select.c b/src/ev_select.c
index 1b897de..bbbbfe0 100644
--- a/src/ev_select.c
+++ b/src/ev_select.c
@@ -89,7 +89,7 @@
/* allow select to return immediately when needed */
delta.tv_sec = delta.tv_usec = 0;
- if (tv_isset(exp)) {
+ if (!run_queue && tv_isset(exp)) {
if (tv_islt(&now, exp)) {
tv_remain(&now, exp, &delta);
/* To avoid eventual select loops due to timer precision */