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

Unified Diff: base/test/launcher/test_launcher.cc

Issue 2445763002: Disallow posting tasks to SequencedWorkerPools by default. (Closed)
Patch Set: self-review 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/test/test_suite.cc » ('j') | base/threading/sequenced_worker_pool.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 2c4a4e21cce33952f66471936655df3ff120ba14..c90505a1bc262770d2091c17213fc0b2bade3cf2 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -38,6 +38,7 @@
#include "base/test/sequenced_worker_pool_owner.h"
#include "base/test/test_switches.h"
#include "base/test/test_timeouts.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread.h"
#include "base/threading/thread_checker.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -819,6 +820,11 @@ bool TestLauncher::Init() {
fprintf(stdout, "Using %" PRIuS " parallel jobs.\n", parallel_jobs_);
fflush(stdout);
if (parallel_jobs_ > 1U) {
+ // Allow usage of SequencedWorkerPool to launch test processes.
+ // TODO(fdoray): Remove this once the SequencedWorkerPool to TaskScheduler
+ // redirection experiment concludes https://crbug.com/622400.
+ SequencedWorkerPool::EnableForProcess();
+
worker_pool_owner_ = MakeUnique<SequencedWorkerPoolOwner>(
parallel_jobs_, "test_launcher");
} else {
« no previous file with comments | « no previous file | base/test/test_suite.cc » ('j') | base/threading/sequenced_worker_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698