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

Unified Diff: base/message_loop/message_pump.h

Issue 18181011: Make a fairer combined message loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: caching the result from MessagePump::NeedsScheduleWorkPerTask Created 7 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
Index: base/message_loop/message_pump.h
diff --git a/base/message_loop/message_pump.h b/base/message_loop/message_pump.h
index 5b722321495240db85ba80a943a1b7b0efe5c332..a553585c89a40ef2730a7c4933c80839dfa5af29 100644
--- a/base/message_loop/message_pump.h
+++ b/base/message_loop/message_pump.h
@@ -119,6 +119,12 @@ class BASE_EXPORT MessagePump : public RefCountedThreadSafe<MessagePump> {
// used on the thread that called Run.
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0;
+ // Returns true if the pump needs ScheduleWork to be called every time
+ // a task has been added to the incoming queue.
+ // The value return by this function should be constant over the lifetime
+ // of this, and the function could be called from any thread.
+ virtual bool NeedsScheduleWorkPerTask();
+
protected:
virtual ~MessagePump();
friend class RefCountedThreadSafe<MessagePump>;

Powered by Google App Engine
This is Rietveld 408576698