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

Unified Diff: base/task_scheduler/task_scheduler_impl_unittest.cc

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
Index: base/task_scheduler/task_scheduler_impl_unittest.cc
diff --git a/base/task_scheduler/task_scheduler_impl_unittest.cc b/base/task_scheduler/task_scheduler_impl_unittest.cc
index d7462147fcb2b6165910e48009a768291f19b740..43f8d745bd2f5f6495afee1560c1be7f9491dfe1 100644
--- a/base/task_scheduler/task_scheduler_impl_unittest.cc
+++ b/base/task_scheduler/task_scheduler_impl_unittest.cc
@@ -185,24 +185,29 @@ class TaskSchedulerImplTest
void SetUp() override {
using IORestriction = SchedulerWorkerPoolParams::IORestriction;
+ using StandbyThreadPolicy = SchedulerWorkerPoolParams::StandbyThreadPolicy;
std::vector<SchedulerWorkerPoolParams> params_vector;
ASSERT_EQ(BACKGROUND_WORKER_POOL, params_vector.size());
params_vector.emplace_back("Background", ThreadPriority::BACKGROUND,
- IORestriction::DISALLOWED, 1U, TimeDelta::Max());
+ IORestriction::DISALLOWED,
+ StandbyThreadPolicy::LAZY, 1U, TimeDelta::Max());
ASSERT_EQ(BACKGROUND_FILE_IO_WORKER_POOL, params_vector.size());
params_vector.emplace_back("BackgroundFileIO", ThreadPriority::BACKGROUND,
- IORestriction::ALLOWED, 3U, TimeDelta::Max());
+ IORestriction::ALLOWED,
+ StandbyThreadPolicy::LAZY, 3U, TimeDelta::Max());
ASSERT_EQ(FOREGROUND_WORKER_POOL, params_vector.size());
params_vector.emplace_back("Foreground", ThreadPriority::NORMAL,
- IORestriction::DISALLOWED, 4U, TimeDelta::Max());
+ IORestriction::DISALLOWED,
+ StandbyThreadPolicy::LAZY, 4U, TimeDelta::Max());
ASSERT_EQ(FOREGROUND_FILE_IO_WORKER_POOL, params_vector.size());
- params_vector.emplace_back("ForegroundFileIO", ThreadPriority::NORMAL,
- IORestriction::ALLOWED, 12U, TimeDelta::Max());
+ params_vector.emplace_back(
+ "ForegroundFileIO", ThreadPriority::NORMAL, IORestriction::ALLOWED,
+ StandbyThreadPolicy::LAZY, 12U, TimeDelta::Max());
scheduler_ = TaskSchedulerImpl::Create(params_vector,
Bind(&GetThreadPoolIndexForTraits));
« no previous file with comments | « base/task_scheduler/scheduler_worker_pool_params.cc ('k') | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698