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

Unified Diff: base/threading/worker_pool.h

Issue 7316015: Support Closure in ALL the loops! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed nit and rebased. Created 9 years, 5 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 | « base/task.cc ('k') | base/threading/worker_pool_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/worker_pool.h
diff --git a/base/threading/worker_pool.h b/base/threading/worker_pool.h
index 12b50b4124ea4526dc7a3824b7b5460eaa6476ab..58471b5050e8372bea920823a9d5151137364f85 100644
--- a/base/threading/worker_pool.h
+++ b/base/threading/worker_pool.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/base_api.h"
+#include "base/callback.h"
#include "base/tracked.h"
class Task;
@@ -27,8 +28,13 @@ class BASE_API WorkerPool {
// should be used for tasks that will take a long time to execute. Returns
// false if |task| could not be posted to a worker thread. Regardless of
// return value, ownership of |task| is transferred to the worker pool.
+ //
+ // TODO(ajwong): Remove the Task* based overload once we've finishsed the
+ // Task -> Closure migration.
static bool PostTask(const tracked_objects::Location& from_here,
Task* task, bool task_is_slow);
+ static bool PostTask(const tracked_objects::Location& from_here,
+ const base::Closure& task, bool task_is_slow);
};
} // namespace base
« no previous file with comments | « base/task.cc ('k') | base/threading/worker_pool_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698