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

Unified Diff: base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc

Issue 2753443005: Followup Feedback on https://codereview.chromium.org/2726073002/ (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « base/task_scheduler/scheduler_single_thread_task_runner_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc
diff --git a/base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc b/base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc
index ea9cb66a21c3371798638d93a51cb60818cee2c2..1311ea8c9921494dd0928a4ce7ab6ad13a3c2bbf 100644
--- a/base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc
+++ b/base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc
@@ -280,6 +280,7 @@ class CallJoinFromDifferentThread : public SimpleThread {
private:
SchedulerSingleThreadTaskRunnerManager* const manager_to_join_;
WaitableEvent run_started_event_;
+
DISALLOW_COPY_AND_ASSIGN(CallJoinFromDifferentThread);
};
@@ -302,6 +303,8 @@ class TaskSchedulerSingleThreadTaskRunnerManagerJoinTest
} // namespace
TEST_F(TaskSchedulerSingleThreadTaskRunnerManagerJoinTest, ConcurrentJoin) {
+ // Exercises the codepath where the workers are unavailable for unregistration
+ // because of a Join call.
WaitableEvent task_running(WaitableEvent::ResetPolicy::MANUAL,
WaitableEvent::InitialState::NOT_SIGNALED);
WaitableEvent task_blocking(WaitableEvent::ResetPolicy::MANUAL,
@@ -328,6 +331,8 @@ TEST_F(TaskSchedulerSingleThreadTaskRunnerManagerJoinTest, ConcurrentJoin) {
TEST_F(TaskSchedulerSingleThreadTaskRunnerManagerJoinTest,
ConcurrentJoinExtraSkippedTask) {
+ // Tests to make sure that tasks are properly cleaned up at Join, allowing
+ // SingleThreadTaskRunners to unregister themselves.
WaitableEvent task_running(WaitableEvent::ResetPolicy::MANUAL,
WaitableEvent::InitialState::NOT_SIGNALED);
WaitableEvent task_blocking(WaitableEvent::ResetPolicy::MANUAL,
« no previous file with comments | « base/task_scheduler/scheduler_single_thread_task_runner_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698