Index: base/threading/sequenced_worker_pool.cc |
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc |
index 89224f74aa4d7b5cafa4398e5b6d2a3c6121c5bb..19b81b7b4b32a32d58bd74e2f8e237aa082f1722 100644 |
--- a/base/threading/sequenced_worker_pool.cc |
+++ b/base/threading/sequenced_worker_pool.cc |
@@ -798,9 +798,11 @@ void SequencedWorkerPool::Inner::ThreadLoop(Worker* this_worker) { |
// to run them. Also, there may be some tasks stuck behind running |
// ones with the same sequence token, but additional threads won't |
// help this case. |
- if (shutdown_called_ && |
- blocking_shutdown_pending_task_count_ == 0) |
+ if (shutdown_called_ && blocking_shutdown_pending_task_count_ == 0) { |
+ AutoUnlock unlock(lock_); |
+ delete_these_outside_lock.clear(); |
break; |
+ } |
waiting_thread_count_++; |
switch (status) { |