Commit c9bc1de1 authored by Jesse McKenna's avatar Jesse McKenna Committed by Commit Bot

TaskScheduler: Make method ordering consistent between...

TaskScheduler: Make method ordering consistent between SchedulerWorkerPoolImpl:: and SchedulerSingleThreadTaskRunnerManager::JoinForTesting

This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1338140

Bug: 889029
Change-Id: I1c179f6617bac417fb54c55e9328e2391d2d7b5b
Reviewed-on: https://chromium-review.googlesource.com/c/1340360
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608942}
parent b511e4a9
...@@ -337,6 +337,8 @@ void SchedulerWorkerPoolImpl::JoinForTesting() { ...@@ -337,6 +337,8 @@ void SchedulerWorkerPoolImpl::JoinForTesting() {
join_for_testing_started_.Set(); join_for_testing_started_.Set();
#endif #endif
shared_priority_queue_.EnableFlushSequencesOnDestroyForTesting();
decltype(workers_) workers_copy; decltype(workers_) workers_copy;
{ {
AutoSchedulerLock auto_lock(lock_); AutoSchedulerLock auto_lock(lock_);
...@@ -355,8 +357,6 @@ void SchedulerWorkerPoolImpl::JoinForTesting() { ...@@ -355,8 +357,6 @@ void SchedulerWorkerPoolImpl::JoinForTesting() {
for (const auto& worker : workers_copy) for (const auto& worker : workers_copy)
worker->JoinForTesting(); worker->JoinForTesting();
shared_priority_queue_.EnableFlushSequencesOnDestroyForTesting();
AutoSchedulerLock auto_lock(lock_); AutoSchedulerLock auto_lock(lock_);
DCHECK(workers_ == workers_copy); DCHECK(workers_ == workers_copy);
// Release |workers_| to clear their TrackedRef against |this|. // Release |workers_| to clear their TrackedRef against |this|.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment