return backend;
}
+unsigned int
+ev_loop_count (EV_P)
+{
+ return loop_count;
+}
+
static void noinline
loop_init (EV_P_ unsigned int flags)
{
call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */
- while (expect_false (!activecnt))
+ do
{
#ifndef _WIN32
if (expect_false (curpid)) /* penalise the forking check even more */
if (expect_false (block < 0.)) block = 0.;
}
+ ++loop_count;
backend_poll (EV_A_ block);
}
call_pending (EV_A);
- if (expect_false (loop_done))
- break;
}
+ while (expect_true (activecnt && !loop_done));
if (loop_done == EVUNLOOP_ONE)
loop_done = EVUNLOOP_CANCEL;