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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: fixed build error and commments Created 3 years, 8 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: base/task_scheduler/scheduler_worker_pool_impl.cc
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.cc b/base/task_scheduler/scheduler_worker_pool_impl.cc
index 874d2111ee460c92a4c40bd757a35278458cbae4..09f1de7addf8509de60546c789c84a2501097b1b 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl.cc
+++ b/base/task_scheduler/scheduler_worker_pool_impl.cc
@@ -66,7 +66,7 @@ class SchedulerParallelTaskRunner : public TaskRunner {
make_scoped_refptr(new Sequence));
}
- bool RunsTasksOnCurrentThread() const override {
+ bool RunsTasksInCurrentSequence() const override {
return tls_current_worker_pool.Get().Get() == worker_pool_;
}
@@ -110,9 +110,7 @@ class SchedulerSequencedTaskRunner : public SequencedTaskRunner {
return PostDelayedTask(from_here, std::move(closure), delay);
}
- bool RunsTasksOnCurrentThread() const override {
- // TODO(fdoray): Rename TaskRunner::RunsTaskOnCurrentThread() to something
- // that reflects this behavior more accurately. crbug.com/646905
+ bool RunsTasksInCurrentSequence() const override {
return sequence_->token() == SequenceToken::GetForCurrentThread();
}

Powered by Google App Engine
This is Rietveld 408576698