Index: base/threading/sequenced_worker_pool.h |
diff --git a/base/threading/sequenced_worker_pool.h b/base/threading/sequenced_worker_pool.h |
index 4d90f920830c87fb2166b9cdd961a05c49783de0..85f902a316c400c3dd7e77a79eccc5fbcf675d98 100644 |
--- a/base/threading/sequenced_worker_pool.h |
+++ b/base/threading/sequenced_worker_pool.h |
@@ -172,6 +172,15 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner { |
// PostSequencedWorkerTask(). Valid tokens are always nonzero. |
static SequenceToken GetSequenceToken(); |
+ // Invoke this once on the main thread of a process, before any other threads |
brettw
2016/08/12 19:30:00
This should have a reference to a bug to remove it
gab
2016/08/12 23:27:46
Done.
|
+ // are created and before any tasks are posted to that process' |
+ // SequencedWorkerPools but after TaskScheduler was instantiated, to force all |
+ // SequencedWorkerPools in that process to redirect their tasks to the |
+ // TaskScheduler. Note: SequencedWorkerPool instances with |max_threads == 1| |
+ // will be special cased to send all of their work as |
+ // ExecutionMode::SINGLE_THREADED. |
+ static void RedirectSequencedWorkerPoolsToTaskSchedulerForProcess(); |
+ |
// When constructing a SequencedWorkerPool, there must be a |
// ThreadTaskRunnerHandle on the current thread unless you plan to |
// deliberately leak it. |