From: root Date: Sat, 1 Dec 2007 22:57:20 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: rel-1_6~7 X-Git-Url: https://git.llucax.com/software/libev.git/commitdiff_plain/647706a2acbfa58a6fdf5fb3ab17f82833faa0b0?ds=inline *** empty log message *** --- diff --git a/ev.c b/ev.c index 2084805..221da59 100644 --- a/ev.c +++ b/ev.c @@ -1344,7 +1344,7 @@ ev_loop (EV_P_ int flags) call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */ - for (;;) + while (expect_false (!activecnt)) { #ifndef _WIN32 if (expect_false (curpid)) /* penalise the forking check even more */ @@ -1386,7 +1386,7 @@ ev_loop (EV_P_ int flags) { ev_tstamp block; - if (flags & EVLOOP_NONBLOCK || idlecnt) + if (expect_false (flags & EVLOOP_NONBLOCK || idlecnt || !activecnt)) block = 0.; /* do not block at all */ else {