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

Unified Diff: base/message_loop/incoming_task_queue.h

Issue 614723003: Avoid scheduling a message loop that we know is not sleeping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/incoming_task_queue.cc » ('j') | base/message_loop/incoming_task_queue.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/incoming_task_queue.h
diff --git a/base/message_loop/incoming_task_queue.h b/base/message_loop/incoming_task_queue.h
index 30f26033a2d5d61d66153c36a66cff2f1e1c33cd..72e1f30282966de72b01a505a6144839a1d00643 100644
--- a/base/message_loop/incoming_task_queue.h
+++ b/base/message_loop/incoming_task_queue.h
@@ -84,6 +84,14 @@ class BASE_EXPORT IncomingTaskQueue
// The next sequence number to use for delayed tasks.
int next_sequence_num_;
+ // True if our message loop has already been scheduled and does not need to be
+ // scheduled again until an empty reload occurs.
+ bool message_loop_scheduled_;
+
+ // True if we always need to call ScheduleWork when receiving a new task, even
+ // if the incoming queue was not empty.
+ const bool always_schedule_work_;
+
DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue);
};
« no previous file with comments | « no previous file | base/message_loop/incoming_task_queue.cc » ('j') | base/message_loop/incoming_task_queue.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698