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

Unified Diff: base/test/scoped_async_task_scheduler.cc

Issue 2628533003: JoinForTesting() in ScopedAsyncTaskScheduler. (Closed)
Patch Set: cast 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_async_task_scheduler.cc
diff --git a/base/test/scoped_async_task_scheduler.cc b/base/test/scoped_async_task_scheduler.cc
index 824b07fba930680f9a019f4a10fc044a1269ba55..dcc5c15fb1549a4b24f325f5e14851362aba9be2 100644
--- a/base/test/scoped_async_task_scheduler.cc
+++ b/base/test/scoped_async_task_scheduler.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/task_scheduler/scheduler_worker_pool_params.h"
#include "base/task_scheduler/task_scheduler.h"
+#include "base/task_scheduler/task_scheduler_impl.h"
namespace base {
namespace test {
@@ -32,6 +33,8 @@ ScopedAsyncTaskScheduler::ScopedAsyncTaskScheduler() {
ScopedAsyncTaskScheduler::~ScopedAsyncTaskScheduler() {
DCHECK_EQ(TaskScheduler::GetInstance(), task_scheduler_);
TaskScheduler::GetInstance()->Shutdown();
+ static_cast<internal::TaskSchedulerImpl*>(TaskScheduler::GetInstance())
+ ->JoinForTesting();
TaskScheduler::SetInstance(nullptr);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698