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

Unified Diff: base/task_scheduler/task_scheduler.h

Issue 2064073003: TaskScheduler: Make the worker pools of TaskSchedulerImpl configurable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused "using" Created 4 years, 6 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.cc » ('j') | base/task_scheduler/task_scheduler_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler.h
diff --git a/base/task_scheduler/task_scheduler.h b/base/task_scheduler/task_scheduler.h
index b8da64b891a952a4cc629ccae962c32c765c9645..5f851b491cc7bf41434cd162134ca4828fa5ea2a 100644
--- a/base/task_scheduler/task_scheduler.h
+++ b/base/task_scheduler/task_scheduler.h
@@ -48,24 +48,17 @@ class BASE_EXPORT TaskScheduler {
// called once.
virtual void Shutdown() = 0;
- // SetInstance() and InitializeDefaultTaskScheduler() register a TaskScheduler
- // to handle tasks posted through the post_task.h API for this process. The
- // registered TaskScheduler will only be deleted when a new TaskScheduler is
- // registered (i.e. otherwise leaked on shutdown). The methods must not be
- // called when TaskRunners created by the previous TaskScheduler are still
- // alive. The methods are not thread-safe; proper synchronization is required
- // to use the post_task.h API after registering a new TaskScheduler.
-
// Registers |task_scheduler| to handle tasks posted through the post_task.h
- // API for this process.
+ // API for this process. The registered TaskScheduler will only be deleted
+ // when a new TaskScheduler is registered (i.e. otherwise leaked on shutdown).
+ // This must not be called when TaskRunners created by the previous
+ // TaskScheduler are still alive. This method is not thread-safe; proper
+ // synchronization is required to use the post_task.h API after registering a
+ // new TaskScheduler.
static void SetInstance(std::unique_ptr<TaskScheduler> task_scheduler);
- // Initializes the default task scheduler for this process.
- static void InitializeDefaultTaskScheduler();
-
- // Retrieve the TaskScheduler set via SetInstance() or
- // InitializeDefaultTaskScheduler(). This should be used very rarely; most
- // users of TaskScheduler should use the post_task.h API.
+ // Retrieve the TaskScheduler set via SetInstance(). This should be used very
+ // rarely; most users of TaskScheduler should use the post_task.h API.
static TaskScheduler* GetInstance();
};
« no previous file with comments | « no previous file | base/task_scheduler/task_scheduler.cc » ('j') | base/task_scheduler/task_scheduler_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698