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

Unified Diff: base/threading/sequenced_worker_pool.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/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index 64f1bbd0bc563bbf3fd67de3d8fc03f76a8dba9d..0a79637518a85c324acc2e011e9f94285644219f 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_);
}
@@ -1615,7 +1616,7 @@ bool SequencedWorkerPool::PostDelayedTask(
return PostDelayedWorkerTask(from_here, std::move(task), delay);
}
-bool SequencedWorkerPool::RunsTasksOnCurrentThread() const {
+bool SequencedWorkerPool::RunsTasksInCurrentSequence() const {
return inner_->RunsTasksOnCurrentThread();
}

Powered by Google App Engine
This is Rietveld 408576698