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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl.h

Issue 2501763002: Add Thread Standby Policy SchedulerWorkerPoolImpl (Closed)
Patch Set: Rebase to edc7bea Created 4 years, 1 month 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_worker_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_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 178133daf6e7cedae0a0c01a7b64036d2341dbba..8014030b541b6e6d4e5face52c20b02ca8856b9c 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl.h
+++ b/base/task_scheduler/scheduler_worker_pool_impl.h
@@ -106,6 +106,10 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
// reclaimed).
void DisallowWorkerDetachmentForTesting();
+ // Returns the number of workers alive in this worker pool. The value may
+ // change if workers are woken up or detached during this call.
+ size_t NumberOfAliveWorkersForTesting();
+
private:
class SchedulerSingleThreadTaskRunner;
class SchedulerWorkerDelegateImpl;
@@ -119,6 +123,7 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
bool Initialize(
ThreadPriority priority_hint,
+ SchedulerWorkerPoolParams::StandbyThreadPolicy standby_thread_policy,
size_t max_threads,
const ReEnqueueSequenceCallback& re_enqueue_sequence_callback);
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_worker_pool_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698