[eio] Bug breaking on maxreqs

ry at tinyclouds.org ry at tinyclouds.org
Tue Jan 5 08:56:51 CET 2010


Hi Marc,

If you send many requests to eio and set either max_poll_reqs or
max_poll_time, then it is possible to get into a situation where
pending responses are sitting on the queue but want_poll hasn't been
called. A solution which, works for me, is to call want_poll_cb() at
the bottom of etp_poll() when someone has broken out of the loop.

diff --git a/eio.c b/eio.c
index 7d54ca9..7a0f087 100644
--- a/eio.c
+++ b/eio.c
@@ -548,6 +548,9 @@ static int etp_poll (void)
         }
     }

+  if (npending && want_poll_cb)
+    want_poll_cb ();
+
   errno = EAGAIN;
   return -1;
 }



More information about the libev mailing list