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

Unified Diff: base/task_scheduler/task_scheduler_impl_unittest.cc

Issue 2650383007: Move Task Scheduler Single Thread Task Runners to Dedicated Threads (Closed)
Patch Set: Created 3 years, 11 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/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 cda06063ed7444fee2a4d7b2c4818332095f7313..201dcb7c42f1dee39fc4cd94411fe7be415369e7 100644
--- a/base/task_scheduler/task_scheduler_impl_unittest.cc
+++ b/base/task_scheduler/task_scheduler_impl_unittest.cc
@@ -277,6 +277,13 @@ TEST_P(TaskSchedulerImplTest, PostTasksViaTaskRunner) {
}
factory.WaitForAllTasksToRun();
+
+ // State like Single Thread Task Runners may be lingering around at this point
+ // attached to tasks on their running thread even though
+ // WaitForAllTasksToRun() returned. This will cause issues when Single Thread
+ // Task Runner unregistration occurs during JoinForTesting(). Flushing out the
+ // tasks prevents this state.
+ scheduler_->FlushForTesting();
fdoray 2017/01/27 16:47:35 Is the issue that this DCHECK can be hit https://c
robliao 2017/01/27 21:25:41 sgtm. Done. Added a reinforcing comment in task_sc
}
INSTANTIATE_TEST_CASE_P(OneTraitsExecutionModePair,

Powered by Google App Engine
This is Rietveld 408576698