[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_sepoll.c b/src/ev_sepoll.c
index 26c5b03..800ac0b 100644
--- a/src/ev_sepoll.c
+++ b/src/ev_sepoll.c
@@ -424,9 +424,10 @@
}
last_skipped = 0;
- if (nbspec || status) {
+ if (nbspec || status || run_queue) {
/* Maybe we have processed some events that we must report, or
- * maybe we still have events in the spec list, so we must not
+ * maybe we still have events in the spec list, or there are
+ * some tasks left pending in the run_queue, so we must not
* wait in epoll() otherwise we will delay their delivery by
* the next timeout.
*/