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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase & remove inline keyword Created 3 years, 7 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
« no previous file with comments | « base/task_scheduler/scheduler_single_thread_task_runner_manager.cc ('k') | base/test/null_task_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ad118afe3152a97fc5fc93e81c7573a4915c6613..50de996bdb010c3677fb0e35633c44c61c58a1b3 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();
}
« no previous file with comments | « base/task_scheduler/scheduler_single_thread_task_runner_manager.cc ('k') | base/test/null_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698