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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl.h

Issue 2834063002: Separate the create and start phases in TaskSchedulerImpl. (Closed)
Patch Set: self-review Created 3 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
« no previous file with comments | « no previous file | base/task_scheduler/task_scheduler.h » ('j') | base/task_scheduler/task_scheduler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/scheduler_worker_pool_impl.h
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.h b/base/task_scheduler/scheduler_worker_pool_impl.h
index 7b285a54d38a84d6380f97bc19e4945f414cae9d..58e158f7e6e4fe7daf91a3814b065ffcb31462d2 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl.h
+++ b/base/task_scheduler/scheduler_worker_pool_impl.h
@@ -38,16 +38,19 @@ namespace internal {
class DelayedTaskManager;
class TaskTracker;
-// A pool of workers that run Tasks. This class is thread-safe.
+// A pool of workers that run Tasks.
+//
+// The pool doesn't create threads before Start() is called. Tasks can be posted
robliao 2017/04/24 22:32:19 Nit: before -> until Apply to the other comments
fdoray 2017/04/25 18:43:34 Done.
+// before Start() is called, but they don't run until Start() is called.
robliao 2017/04/24 22:32:18 Tasks can be posted at any time but will not run u
fdoray 2017/04/25 18:43:34 Done.
+//
+// This class is thread-safe.
class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
public:
// Callback invoked when a Sequence isn't empty after a worker pops a Task
// from it.
using ReEnqueueSequenceCallback = Callback<void(scoped_refptr<Sequence>)>;
- // Constructs a pool without workers. Tasks can be posted to the pool, but
- // they won't run until workers are created. To create workers and start
- // running tasks, call Start().
+ // Constructs a pool without workers.
//
// |name| is used to label the pool's threads ("TaskScheduler" + |name| +
// index) and histograms ("TaskScheduler." + histogram name + "." + |name| +
« no previous file with comments | « no previous file | base/task_scheduler/task_scheduler.h » ('j') | base/task_scheduler/task_scheduler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698