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

Unified Diff: content/public/browser/browser_thread.h

Issue 10007010: Add BrowserThread::PostBlockingTaskAndReply. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
Index: content/public/browser/browser_thread.h
diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h
index 91875921ed143e55095712654a627699415e1ed0..6930f081cc41be1fd67abdd70ae26867be103f16 100644
--- a/content/public/browser/browser_thread.h
+++ b/content/public/browser/browser_thread.h
@@ -154,9 +154,10 @@ class CONTENT_EXPORT BrowserThread {
// for doing things like blocking I/O.
//
// The first variant will run the task in the pool with no sequencing
- // semantics, so may get run in parallel with other posted tasks. The
- // second variant provides sequencing between tasks with the same
- // sequence token name.
+ // semantics, so may get run in parallel with other posted tasks. The second
+ // variant will all post a task with no sequencing semantics, and will post a
+ // reply task to the origin TaskRunner upon completion. The third variant
+ // provides sequencing between tasks with the same sequence token name.
//
// These tasks are guaranteed to run before shutdown.
//
@@ -168,6 +169,10 @@ class CONTENT_EXPORT BrowserThread {
// GetBlockingPool().
static bool PostBlockingPoolTask(const tracked_objects::Location& from_here,
const base::Closure& task);
+ static bool PostBlockingPoolTaskAndReply(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ const base::Closure& reply);
static bool PostBlockingPoolSequencedTask(
const std::string& sequence_token_name,
const tracked_objects::Location& from_here,
« content/browser/browser_thread_impl.cc ('K') | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698