Chromium Code Reviews| 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 a9659b3aec17d700fa7f99b6e27272f221aabfe0..a1f56f560fd1fc01b677f8583a9e5597690d9a32 100644 |
| --- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h |
| +++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h |
| @@ -24,13 +24,19 @@ class TaskQueueImpl; |
| class TaskQueueManager; |
| class TaskQueueManagerDelegate; |
| -// The TimeDomain's job is to keep track of moments when delayed tasks have been |
| -// scheduled to fire and to notify their TaskQueues via UpdateDelayedWorkQueue. |
| +// The TimeDomain's job is to wake task queues up when their next delayed tasks |
| +// are due to fire. TaskQueues request a wake up via ScheduleDelayedWork, when |
| +// the WakeUp is due the TimeDomain calls |
| +// TaskQueue::MoveReadyDelayedTasksToDelayedWorkQueue which schedules the next |
| +// non-canceled wakeup. |
| // |
| -// The time domain keeps track of the next wakeup required to pump delayed tasks |
| -// and issues |RequestWakeup| calls to the subclass as needed. Where possible |
| -// it tried to de-dupe these wakeups. Ideally it would be possible to cancel |
| -// them, but that's not currently supported by the base message loop. |
| +// To prevent spurious wake-ups for canceled tasks the TaskQueue should only |
| +// have |
|
Sami
2016/09/13 17:42:53
nit: reformat
alex clarke (OOO till 29th)
2016/09/14 09:04:24
Done.
|
| +// a single wake up registered with its TimeDomain. If should call |
| +// CancelDelayedWork as needed to ensure this. The TimeDomain communicates with |
| +// the TaskQueueManager to actually schedule the wake-ups on the underlying |
| +// base::MessageLoop. Various levels of de-duping are employed to prevent |
| +// unnecessary posting of TaskQueueManager::DoWork. |
| // |
| // The clock itself is provided by subclasses of the TimeDomain and it may be |
| // the real wall clock or a synthetic (virtual) time base. |