| Index: base/task_scheduler/delayed_task_manager.h
|
| diff --git a/base/task_scheduler/delayed_task_manager.h b/base/task_scheduler/delayed_task_manager.h
|
| index 7503dec05c92d24f7466f04c584e3573256628ab..e4031acd1954a86f2ac444a8e2c49a00b60d7e88 100644
|
| --- a/base/task_scheduler/delayed_task_manager.h
|
| +++ b/base/task_scheduler/delayed_task_manager.h
|
| @@ -24,11 +24,11 @@ namespace base {
|
| namespace internal {
|
|
|
| class SchedulerThreadPoolInterface;
|
| +class SchedulerWorkerThread;
|
|
|
| // A DelayedTaskManager holds delayed Tasks until they become ripe for
|
| // execution. When they become ripe for execution, it posts them to their
|
| -// associated Sequence and SchedulerThreadPoolInterface. This class is thread-
|
| -// safe.
|
| +// SchedulerThreadPoolInterface. This class is thread-safe.
|
| class BASE_EXPORT DelayedTaskManager {
|
| public:
|
| // |on_delayed_run_time_updated| is invoked when the delayed run time is
|
| @@ -37,14 +37,16 @@ class BASE_EXPORT DelayedTaskManager {
|
| ~DelayedTaskManager();
|
|
|
| // Adds |task| to a queue of delayed tasks. The task will be posted to
|
| - // |thread_pool| as part of |sequence| the first time that PostReadyTasks() is
|
| - // called while Now() is passed |task->delayed_run_time|.
|
| + // |thread_pool| with |sequence| and |worker_thread| the first time that
|
| + // PostReadyTasks() is called while Now() is passed |task->delayed_run_time|.
|
| + // |worker_thread| is optional.
|
| //
|
| - // TODO(robliao): Find a concrete way to manage |thread_pool|'s memory. It is
|
| - // never deleted in production, but it is better not to spread this assumption
|
| - // throughout the scheduler.
|
| + // TODO(robliao): Find a concrete way to manage the memory of |worker_thread|
|
| + // and |thread_pool|. These objects are never deleted in production, but it is
|
| + // better not to spread this assumption throughout the scheduler.
|
| void AddDelayedTask(std::unique_ptr<Task> task,
|
| scoped_refptr<Sequence> sequence,
|
| + SchedulerWorkerThread* worker_thread,
|
| SchedulerThreadPoolInterface* thread_pool);
|
|
|
| // Posts delayed tasks that are ripe for execution.
|
|
|