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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl.h

Issue 2721553003: Remove SingleThreadTaskRunner Support from SchedulerWorkerPoolImpl (Closed)
Patch Set: Rebase to 08266b3 Created 3 years, 9 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.h
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.h b/base/task_scheduler/scheduler_worker_pool_impl.h
index d4b8440ce86c1a1666a5339a000cdcffe9b19bcc..0c1fdcd13a2e71506164efb7abc4dff420f295ea 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl.h
+++ b/base/task_scheduler/scheduler_worker_pool_impl.h
@@ -67,16 +67,12 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
const TaskTraits& traits) override;
scoped_refptr<SequencedTaskRunner> CreateSequencedTaskRunnerWithTraits(
const TaskTraits& traits) override;
- scoped_refptr<SingleThreadTaskRunner> CreateSingleThreadTaskRunnerWithTraits(
- const TaskTraits& traits) override;
void ReEnqueueSequence(scoped_refptr<Sequence> sequence,
const SequenceSortKey& sequence_sort_key) override;
bool PostTaskWithSequence(std::unique_ptr<Task> task,
- scoped_refptr<Sequence> sequence,
- SchedulerWorker* worker) override;
+ scoped_refptr<Sequence> sequence) override;
void PostTaskWithSequenceNow(std::unique_ptr<Task> task,
- scoped_refptr<Sequence> sequence,
- SchedulerWorker* worker) override;
+ scoped_refptr<Sequence> sequence) override;
const HistogramBase* num_tasks_before_detach_histogram() const {
return num_tasks_before_detach_histogram_;
@@ -111,7 +107,6 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
size_t NumberOfAliveWorkersForTesting();
private:
- class SchedulerSingleThreadTaskRunner;
class SchedulerWorkerDelegateImpl;
SchedulerWorkerPoolImpl(const SchedulerWorkerPoolParams& params,
@@ -122,9 +117,6 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
const SchedulerWorkerPoolParams& params,
const ReEnqueueSequenceCallback& re_enqueue_sequence_callback);
- // Wakes up |worker|.
- void WakeUpWorker(SchedulerWorker* worker);
-
// Wakes up the last worker from this worker pool to go idle, if any.
void WakeUpOneWorker();
@@ -147,13 +139,6 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
// of the worker pool.
std::vector<scoped_refptr<SchedulerWorker>> workers_;
- // Synchronizes access to |next_worker_index_|.
- SchedulerLock next_worker_index_lock_;
-
- // Index of the worker that will be assigned to the next single-threaded
- // TaskRunner returned by this pool.
- size_t next_worker_index_ = 0;
-
// PriorityQueue from which all threads of this worker pool get work.
PriorityQueue shared_priority_queue_;

Powered by Google App Engine
This is Rietveld 408576698