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

Unified Diff: base/message_loop.h

Issue 6374010: Add MessageLoop::AssertIdle(). Use in ChromeOS audio threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | base/message_loop.cc » ('j') | base/message_loop.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.h
diff --git a/base/message_loop.h b/base/message_loop.h
index 7a3af6ef885800d34bf41c9ec274efcda4d8a8fd..8b51842472765e6f03e80ac4bb32f4c20c272127 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -315,6 +315,10 @@ class MessageLoop : public base::MessagePump::Delegate {
// for at least 1s.
static const int kHighResolutionTimerModeLeaseTimeMs = 1000;
+ // Asserts that the MessageLoop is "idle". in reality, we only check
+ // |incoming_queue_|, since we don't want to lock |work_queue_|.
+ void AssertIdle() const;
+
//----------------------------------------------------------------------------
protected:
struct RunState {
@@ -461,12 +465,12 @@ class MessageLoop : public base::MessagePump::Delegate {
scoped_refptr<base::Histogram> message_histogram_;
// A null terminated list which creates an incoming_queue of tasks that are
- // aquired under a mutex for processing on this instance's thread. These tasks
+ // acquired under a mutex for processing on this instance's thread. These tasks
// have not yet been sorted out into items for our work_queue_ vs items that
// will be handled by the TimerManager.
TaskQueue incoming_queue_;
// Protect access to incoming_queue_.
- base::Lock incoming_queue_lock_;
+ mutable base::Lock incoming_queue_lock_;
RunState* state_;
« no previous file with comments | « no previous file | base/message_loop.cc » ('j') | base/message_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698