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

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 10829318: Make sure that shutdown blocking SequencedWorkerPool use Critical Closures. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index fb6b2478f925dc4fb2c88163168955fe2e64c3fa..68127a5b8a100bad4613d31266daca964f8f7582 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -13,6 +13,7 @@
#include "base/atomicops.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/critical_closure.h"
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
#include "base/message_loop_proxy.h"
@@ -490,7 +491,9 @@ bool SequencedWorkerPool::Inner::PostTask(
sequenced.sequence_token_id = sequence_token.id_;
sequenced.shutdown_behavior = shutdown_behavior;
sequenced.posted_from = from_here;
- sequenced.task = task;
+ sequenced.task =
+ shutdown_behavior == BLOCK_SHUTDOWN ?
+ base::MakeCriticalClosure(task) : task;
int create_thread_id = 0;
{
« 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