Index: base/task_scheduler/scheduler_thread_pool_interface.h |
diff --git a/base/task_scheduler/scheduler_thread_pool_interface.h b/base/task_scheduler/scheduler_thread_pool_interface.h |
index 3339849e00a88bd5234088cb9bc63f931d998776..adbb0d79270dbec1a4038e8e47e93845bc5fbaf9 100644 |
--- a/base/task_scheduler/scheduler_thread_pool_interface.h |
+++ b/base/task_scheduler/scheduler_thread_pool_interface.h |
@@ -15,16 +15,22 @@ |
namespace base { |
namespace internal { |
+class SchedulerWorkerThread; |
+ |
// Interface for a thread pool. |
class BASE_EXPORT SchedulerThreadPoolInterface { |
public: |
virtual ~SchedulerThreadPoolInterface() = default; |
- // Posts |task| to be executed by this thread pool as part of |sequence|. The |
- // scheduler's TaskTracker must have allowed |task| to be posted before this |
- // is called. This must only be called after |task|'s delayed run time. |
- virtual void PostTaskWithSequenceNow(std::unique_ptr<Task> task, |
- scoped_refptr<Sequence> sequence) = 0; |
+ // Posts |task| to be executed as part of |sequence|. |task| will run on |
+ // |worker_thread| if specified; otherwise it can run on a any thread owned by |
+ // this pool. The scheduler's TaskTracker must have allowed |task| to be |
+ // posted before this is called. This must only be called after |task|'s |
+ // delayed run time. |
+ virtual void PostTaskWithSequenceNow( |
+ std::unique_ptr<Task> task, |
+ scoped_refptr<Sequence> sequence, |
+ SchedulerWorkerThread* worker_thread) = 0; |
}; |
} // namespace internal |