From 9674435454b9c0488807c1d672b44a3e6103a21e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 Apr 2008 10:55:39 +0000 Subject: *** empty log message *** --- Changes | 2 ++ ev.c | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index 28d6f83..cefe753 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ Revision history for libev, a high-performance and full-featured event loop. - fix a 64 bit overflow issue in the select backend, by using fd_mask instead of int for the mask. - rename internal sighandler to avoid clash with very old perls. + - entering ev_loop will not clear the ONESHOT or NONBLOCKING + flags of any outer loops anymore. - add ev_async_pending. 3.1 Thu Mar 13 13:45:22 CET 2008 diff --git a/ev.c b/ev.c index d04a6be..4475386 100644 --- a/ev.c +++ b/ev.c @@ -1544,9 +1544,7 @@ static int loop_done; void ev_loop (EV_P_ int flags) { - loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK) - ? EVUNLOOP_ONE - : EVUNLOOP_CANCEL; + loop_done = EVUNLOOP_CANCEL; call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */ @@ -1652,9 +1650,12 @@ ev_loop (EV_P_ int flags) queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); call_pending (EV_A); - } - while (expect_true (activecnt && !loop_done)); + while (expect_true ( + activecnt + && !loop_done + && !(flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK)) + )); if (loop_done == EVUNLOOP_ONE) loop_done = EVUNLOOP_CANCEL; -- cgit v1.2.3