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

Unified Diff: base/task_scheduler/task_scheduler.h

Issue 2511473004: Create base::test::ScopedTaskScheduler. (Closed)
Patch Set: CR robliao/gab #4-6 Created 4 years, 1 month 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_impl.h » ('j') | base/test/scoped_task_scheduler.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 385edd77a8bbf4df73a043753c624d19d1c0afb1..febb49a52101faf317876c8ac8a2a44f24c8498c 100644
--- a/base/task_scheduler/task_scheduler.h
+++ b/base/task_scheduler/task_scheduler.h
@@ -82,6 +82,10 @@ class BASE_EXPORT TaskScheduler {
// other threads during the call. Returns immediately when shutdown completes.
virtual void FlushForTesting() = 0;
+ // Joins all threads of this scheduler. Tasks that are already running are
+ // allowed to complete their execution. This can only be called once.
+ virtual void JoinForTesting() = 0;
+
// CreateAndSetDefaultTaskScheduler() and SetInstance() 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
« no previous file with comments | « no previous file | base/task_scheduler/task_scheduler_impl.h » ('j') | base/test/scoped_task_scheduler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698