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

Unified Diff: base/task_scheduler/scheduler_thread_pool_impl.h

Issue 1903103007: TaskScheduler: Make SchedulerWorkerThread own its delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sched_2b_remove_utils
Patch Set: rebase Created 4 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
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_thread_pool_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/scheduler_thread_pool_impl.h
diff --git a/base/task_scheduler/scheduler_thread_pool_impl.h b/base/task_scheduler/scheduler_thread_pool_impl.h
index 3ed91bd3df5fb129da2e985437fdc9b521497308..b764f2716495438564c0820760ac3cab39969d67 100644
--- a/base/task_scheduler/scheduler_thread_pool_impl.h
+++ b/base/task_scheduler/scheduler_thread_pool_impl.h
@@ -51,7 +51,7 @@ class BASE_EXPORT SchedulerThreadPoolImpl : public SchedulerThreadPool {
// handle shutdown behavior of Tasks. |delayed_task_manager| handles Tasks
// posted with a delay. Returns nullptr on failure to create a thread pool
// with at least one thread.
- static std::unique_ptr<SchedulerThreadPoolImpl> CreateThreadPool(
+ static std::unique_ptr<SchedulerThreadPoolImpl> Create(
ThreadPriority thread_priority,
size_t max_threads,
const ReEnqueueSequenceCallback& re_enqueue_sequence_callback,
@@ -80,11 +80,13 @@ class BASE_EXPORT SchedulerThreadPoolImpl : public SchedulerThreadPool {
class SchedulerWorkerThreadDelegateImpl;
SchedulerThreadPoolImpl(
- const ReEnqueueSequenceCallback& re_enqueue_sequence_callback,
TaskTracker* task_tracker,
DelayedTaskManager* delayed_task_manager);
- bool Initialize(ThreadPriority thread_priority, size_t max_threads);
+ bool Initialize(
+ ThreadPriority thread_priority,
+ size_t max_threads,
+ const ReEnqueueSequenceCallback& re_enqueue_sequence_callback);
// Wakes up the last thread from this thread pool to go idle, if any.
void WakeUpOneThread();
@@ -115,9 +117,6 @@ class BASE_EXPORT SchedulerThreadPoolImpl : public SchedulerThreadPool {
// Signaled once JoinForTesting() has returned.
WaitableEvent join_for_testing_returned_;
- // Delegate for all worker threads in this pool.
- std::unique_ptr<SchedulerWorkerThread::Delegate> worker_thread_delegate_;
-
TaskTracker* const task_tracker_;
DelayedTaskManager* const delayed_task_manager_;
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_thread_pool_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698