diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 00:53:48 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 00:53:48 +0000 |
commit | 8d6ab8f55fd416074c751242e23634476a19b9ca (patch) | |
tree | 7b9217567bb114c4cbede21418c669fd67907443 /base/message_loop.h | |
parent | a87078352ef50bf6ea9ebc3598a7d23c17e69817 (diff) | |
download | chromium_src-8d6ab8f55fd416074c751242e23634476a19b9ca.zip chromium_src-8d6ab8f55fd416074c751242e23634476a19b9ca.tar.gz chromium_src-8d6ab8f55fd416074c751242e23634476a19b9ca.tar.bz2 |
Add MessageLoop::AssertIdle(). Use in ChromeOS audio threads.
BUG=chrome-os:11110
TEST=existing
Review URL: http://codereview.chromium.org/6374010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72576 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r-- | base/message_loop.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/base/message_loop.h b/base/message_loop.h index 7a3af6e..d238997 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -315,6 +315,9 @@ class MessageLoop : public base::MessagePump::Delegate { // for at least 1s. static const int kHighResolutionTimerModeLeaseTimeMs = 1000; + // Asserts that the MessageLoop is "idle". + void AssertIdle() const; + //---------------------------------------------------------------------------- protected: struct RunState { @@ -461,12 +464,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_; |