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

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 2389923004: Allow BLOCK_SHUTDOWN tasks during shutdown with SequencedWorkerPool redirected to TaskScheduler. (Closed)
Patch Set: CR gab #5 Created 4 years, 2 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 | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index c179a039f2f7e1877a530ed4d67e24f75635a47c..d856c3a70b7cbc9c2e0e20908de519b3d0d1ce97 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -924,11 +924,12 @@ void SequencedWorkerPool::Inner::Shutdown(
return;
shutdown_called_ = true;
+ max_blocking_tasks_after_shutdown_ = max_new_blocking_tasks_after_shutdown;
+
if (subtle::NoBarrier_Load(&g_all_pools_state) !=
- AllPoolsState::WORKER_CREATED)
+ AllPoolsState::WORKER_CREATED) {
return;
-
- max_blocking_tasks_after_shutdown_ = max_new_blocking_tasks_after_shutdown;
+ }
// Tickle the threads. This will wake up a waiting one so it will know that
// it can exit, which in turn will wake up any other waiting ones.
« no previous file with comments | « no previous file | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698