Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Unified Diff: third_party/libevent/event.c

Issue 7262011: Change MessagePumpLibevent::Run to handle IO events before doing idle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/message_pump_libevent.cc ('K') | « base/message_pump_libevent.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libevent/event.c
===================================================================
--- third_party/libevent/event.c (revision 90439)
+++ third_party/libevent/event.c (working copy)
@@ -469,6 +469,7 @@
struct timeval tv;
struct timeval *tv_p;
int res, done;
+ int processed_active = 0;
/* clear time cache */
base->tv_cache.tv_sec = 0;
@@ -523,6 +524,7 @@
if (base->event_count_active) {
event_process_active(base);
+ processed_active = 1;
if (!base->event_count_active && (flags & EVLOOP_ONCE))
done = 1;
} else if (flags & EVLOOP_NONBLOCK)
@@ -533,7 +535,7 @@
base->tv_cache.tv_sec = 0;
event_debug(("%s: asked to terminate loop.", __func__));
- return (0);
+ return (processed_active ? 2 : 0);
wtc 2011/06/25 00:39:45 The return value 0 means success. 1 means no even
}
/* Sets up an event for processing once */
« base/message_pump_libevent.cc ('K') | « base/message_pump_libevent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698