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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/time_domain.h

Issue 2653643002: Move has_incoming_immediate_work to the TaskQueueManager (Closed)
Patch Set: Don't try to be quite so clever in TaskQueueManager::ComputeDelayTillNextTask Created 3 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
Index: third_party/WebKit/Source/platform/scheduler/base/time_domain.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
index 9da367d63ee7997e68e6adeed44432804b2049c3..10202f51059d5e8e0350dbd8020bbf705c26c7a4 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
@@ -91,11 +91,9 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
// the next task was posted to and it returns true. Returns false otherwise.
bool NextScheduledTaskQueue(TaskQueue** out_task_queue) const;
- // Adds |queue| to |has_incoming_immediate_work_| which causes
- // UpdateWorkQueues to reload the immediate work queue if empty. Can be
- // called from any thread.
- // TODO(alexclarke): Move this to the TaskQueueManager.
- void OnQueueHasIncomingImmediateWork(internal::TaskQueueImpl* queue);
+ // Notifies the time domain observer (if any) that |queue| has incoming
+ // immediate work.
+ void OnQueueHasImmediateWork(internal::TaskQueueImpl* queue);
// Schedules a call to TaskQueueImpl::WakeUpForDelayedWork when this
// TimeDomain reaches |delayed_run_time|. This supersedes any previously
@@ -114,9 +112,6 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
// Removes |queue| from all internal data structures.
void UnregisterQueue(internal::TaskQueueImpl* queue);
- // Updates active queues associated with this TimeDomain.
- void UpdateWorkQueues(LazyNow* lazy_now);
-
// Called by the TaskQueueManager when the TimeDomain is registered.
virtual void OnRegisterWithTaskQueueManager(
TaskQueueManager* task_queue_manager) = 0;
@@ -167,15 +162,7 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
IntrusiveHeap<DelayedWakeup> delayed_wakeup_queue_;
- // This lock guards only |has_incoming_immediate_work_|. It's not expected to
- // be heavily contended.
- mutable base::Lock has_incoming_immediate_work_lock_;
-
- // Set of task queues with newly available work on the incoming queue.
- // TODO(alexclarke): Move this to the TaskQueueManager.
- std::set<internal::TaskQueueImpl*> has_incoming_immediate_work_;
-
- Observer* observer_; // NOT OWNED.
+ Observer* const observer_; // NOT OWNED.
base::ThreadChecker main_thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698