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

Unified Diff: base/threading/sequenced_worker_pool.h

Issue 2077413009: Add TaskPriority as a parameter to SequencedWorkerPool in preparation for TaskScheduler experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2_hook
Patch Set: Created 4 years, 6 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.h
diff --git a/base/threading/sequenced_worker_pool.h b/base/threading/sequenced_worker_pool.h
index cbec39561a40db6fd5d3e773907a0642428d4bcf..e1f3e9b2ffcee4b25cf1fd71189a119843f4017f 100644
--- a/base/threading/sequenced_worker_pool.h
+++ b/base/threading/sequenced_worker_pool.h
@@ -17,6 +17,7 @@
#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
+#include "base/task_scheduler/task_traits.h"
namespace tracked_objects {
class Location;
@@ -187,13 +188,17 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner {
// Pass the maximum number of threads (they will be lazily created as needed)
// and a prefix for the thread name to aid in debugging.
+ // |task_priority| will be used to hint base::TaskScheduler for an experiment
+ // in which all SequencedWorkerPool tasks will be redirected to it.
SequencedWorkerPool(size_t max_threads,
- const std::string& thread_name_prefix);
+ const std::string& thread_name_prefix,
+ base::TaskPriority task_priority);
// Like above, but with |observer| for testing. Does not take ownership of
// |observer|.
SequencedWorkerPool(size_t max_threads,
const std::string& thread_name_prefix,
+ base::TaskPriority task_priority,
TestingObserver* observer);
// Returns the sequence token associated with the given name. Calling this

Powered by Google App Engine
This is Rietveld 408576698