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

Unified Diff: base/threading/sequenced_worker_pool.h

Issue 2367843002: Support SequencedWorkerPool::FlushForTesting() with redirection to TaskScheduler. (Closed)
Patch Set: CR danakj #10 Created 4 years, 3 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/threading/sequenced_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool.h
diff --git a/base/threading/sequenced_worker_pool.h b/base/threading/sequenced_worker_pool.h
index 722380e8061b6495cbf37ebb98a16cd39ca38a90..53bb153068c1390a0c422dd7bc2ae22adad9c8d0 100644
--- a/base/threading/sequenced_worker_pool.h
+++ b/base/threading/sequenced_worker_pool.h
@@ -335,13 +335,19 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner {
// Blocks until all pending tasks are complete. This should only be called in
// unit tests when you want to validate something that should have happened.
- // This will not flush delayed tasks; delayed tasks get deleted.
+ // Does not wait for delayed tasks. If redirection to TaskScheduler is
+ // disabled, delayed tasks are deleted. If redirection to TaskScheduler is
+ // enabled, this will wait for all tasks posted to TaskScheduler (not just
+ // tasks posted to this SequencedWorkerPool).
//
// Note that calling this will not prevent other threads from posting work to
// the queue while the calling thread is waiting on Flush(). In this case,
// Flush will return only when there's no more work in the queue. Normally,
// this doesn't come up since in a test, all the work is being posted from
// the main thread.
+ //
+ // TODO(gab): Remove mentions of TaskScheduler in this comment if
+ // http://crbug.com/622400 fails.
void FlushForTesting();
// Spuriously signal that there is work to be done.
« no previous file with comments | « no previous file | base/threading/sequenced_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698