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

Unified Diff: base/threading/sequenced_worker_pool.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/threading/sequenced_worker_pool.h ('k') | base/threading/worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index df218a623fafaa15d755e65b15c265a6df69c766..1a6aca749cf14863f64048158897929b7cf1692d 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -145,7 +145,7 @@ class SequencedWorkerPoolTaskRunner : public TaskRunner {
bool PostDelayedTask(const tracked_objects::Location& from_here,
OnceClosure task,
TimeDelta delay) override;
- bool RunsTasksOnCurrentThread() const override;
+ bool RunsTasksInCurrentSequence() const override;
private:
~SequencedWorkerPoolTaskRunner() override;
@@ -176,8 +176,8 @@ bool SequencedWorkerPoolTaskRunner::PostDelayedTask(
return pool_->PostDelayedWorkerTask(from_here, std::move(task), delay);
}
-bool SequencedWorkerPoolTaskRunner::RunsTasksOnCurrentThread() const {
- return pool_->RunsTasksOnCurrentThread();
+bool SequencedWorkerPoolTaskRunner::RunsTasksInCurrentSequence() const {
+ return pool_->RunsTasksInCurrentSequence();
}
} // namespace
@@ -199,7 +199,8 @@ class SequencedWorkerPool::PoolSequencedTaskRunner
bool PostDelayedTask(const tracked_objects::Location& from_here,
OnceClosure task,
TimeDelta delay) override;
- bool RunsTasksOnCurrentThread() const override;
+ bool RunsTasksInCurrentSequence() const override;
+
// SequencedTaskRunner implementation
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
@@ -243,7 +244,7 @@ bool SequencedWorkerPool::PoolSequencedTaskRunner::PostDelayedTask(
}
bool SequencedWorkerPool::PoolSequencedTaskRunner::
- RunsTasksOnCurrentThread() const {
+ RunsTasksInCurrentSequence() const {
return pool_->IsRunningSequenceOnCurrentThread(token_);
}
@@ -1617,7 +1618,7 @@ bool SequencedWorkerPool::PostDelayedTask(
return PostDelayedWorkerTask(from_here, std::move(task), delay);
}
-bool SequencedWorkerPool::RunsTasksOnCurrentThread() const {
+bool SequencedWorkerPool::RunsTasksInCurrentSequence() const {
return inner_->RunsTasksOnCurrentThread();
}
« no previous file with comments | « base/threading/sequenced_worker_pool.h ('k') | base/threading/worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698