summaryrefslogtreecommitdiffstats
path: root/base/message_loop.h
diff options
context:
space:
mode:
authorjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 13:10:20 +0000
committerjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 13:10:20 +0000
commit7e0e876b16395b6aa4aa6868434d18ef975e4ae0 (patch)
tree8606bab668332a5121a5a09929d5a8f65792460d /base/message_loop.h
parent6a0ecac6e243c72e79bca203aac7def4b6687fd1 (diff)
downloadchromium_src-7e0e876b16395b6aa4aa6868434d18ef975e4ae0.zip
chromium_src-7e0e876b16395b6aa4aa6868434d18ef975e4ae0.tar.gz
chromium_src-7e0e876b16395b6aa4aa6868434d18ef975e4ae0.tar.bz2
Support RanAllPending() rather than RunOnce(), and integrated into ipc_sync_channel.
RunOnce() semantics were not sufficient to support the effort to pump messages in ipc_sync_channel, as ipc_sync_channel is not able to detect pending Tasks. This change list switches to RunAllPending() tasks, rather than just Running the items that avail themselves in one run of the loop. This is a very small mod of the existing code. I'm still trying to stay focused on the bug at hand, and minimize chances of unrelated regressions (we only modify IPC channel semantics). The slight semantic change (from original attempts to call Quit() externally and then Run()) is that we now terminate the message loop after also servicing the high-resolution timer tasks. bug=1291034 r=darin M base/message_loop.h M base/message_loop.cc M chrome/common/ipc_sync_channel.cc git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r--base/message_loop.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/base/message_loop.h b/base/message_loop.h
index ecb7e27..1610d07 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -252,8 +252,9 @@ class MessageLoop {
// Run the message loop.
void Run();
- // Run just one pass through the message loop.
- void RunOnce();
+ // Process all pending tasks, windows messages, etc., but don't wait/sleep.
+ // Return as soon as all items that can be run are taken care of.
+ void RunAllPending();
// See description of Dispatcher for how Run uses Dispatcher.
void Run(Dispatcher* dispatcher);
@@ -443,16 +444,18 @@ class MessageLoop {
// stacks around the running of a main message loop.
// It will run the message loop in a SEH try block or not depending on the
// set_SEH_restoration() flag.
- void RunHandler(Dispatcher* dispatcher, bool run_loop_once);
+ void RunHandler(Dispatcher* dispatcher, bool non_blocking);
// A surrounding stack frame around the running of the message loop that
// supports all saving and restoring of state, as is needed for any/all (ugly)
// recursive calls.
- void RunInternal(Dispatcher* dispatcher, bool run_loop_once);
+ void RunInternal(Dispatcher* dispatcher, bool non_blocking);
// An extended message loop (message pump) that loops mostly forever, and
// processes task, signals, timers, etc.
- void RunTraditional(bool run_loop_once);
+ // If non-blocking is set, it will return rather than wait for new things to
+ // arrive for processing.
+ void RunTraditional(bool non_blocking);
//----------------------------------------------------------------------------
// A list of method wrappers with identical calling signatures (no arguments)