Index: components/scheduler/child/child_scheduler.h |
diff --git a/components/scheduler/child/child_scheduler.h b/components/scheduler/child/child_scheduler.h |
index 8fd5359e8cfc38647aa567031a51f34384dcc526..354656b71fb4779ff10a489bf4beca579a881178 100644 |
--- a/components/scheduler/child/child_scheduler.h |
+++ b/components/scheduler/child/child_scheduler.h |
@@ -27,6 +27,10 @@ class SCHEDULER_EXPORT ChildScheduler { |
// time if no idle time is available. |
virtual scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() = 0; |
+ // Returns the shutdown task runner. Intended for tasks that must be able to |
+ // run, even after PreShutdown() is called. |
+ virtual scoped_refptr<base::SingleThreadTaskRunner> ShutdownTaskRunner() = 0; |
+ |
// Returns true if there is high priority work pending on the main thread |
// and the caller should yield to let the scheduler service that work. Note |
// that this is a stricter condition than |IsHighPriorityWorkAnticipated|, |
@@ -52,6 +56,11 @@ class SCHEDULER_EXPORT ChildScheduler { |
virtual void RemoveTaskObserver( |
base::MessageLoop::TaskObserver* task_observer) = 0; |
+ // Optional. This stops all queues except for shutdown and control queues. |
+ // If posted from a different thread, it blocks until the thread this class |
+ // was created on has completed the pre-shutdown. |
rmcilroy
2015/04/24 09:41:02
I'm not sure what the second sentence means. As fa
alex clarke (OOO till 29th)
2015/04/24 14:10:05
This comment was duplicated and I forgot to change
|
+ virtual void PreShutdown() = 0; |
+ |
// Shuts down the scheduler by dropping any remaining pending work in the work |
// queues. After this call any work posted to the task runners will be |
// silently dropped. |