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

Unified Diff: base/threading/thread.h

Issue 2337253003: Add FlushForTesting to base::Thread. (Closed)
Patch Set: 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/thread.cc » ('j') | base/threading/thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread.h
diff --git a/base/threading/thread.h b/base/threading/thread.h
index 5bb53f77d3086faf64f8c109d0b2ec1a3bdfc52d..b8136db8829c172b1a791b372291af4bfffb7ec2 100644
--- a/base/threading/thread.h
+++ b/base/threading/thread.h
@@ -140,6 +140,9 @@ class BASE_EXPORT Thread : PlatformThread::Delegate {
// carefully for production code.
bool WaitUntilThreadStarted() const;
+ // Blocks until all tasks previously posted to this thread have been executed.
+ void FlushForTesting();
+
// Signals the thread to exit and returns once the thread has exited. The
// Thread object is completely reset and may be used as if it were newly
// constructed (i.e., Start may be called again). Can only be called if
« no previous file with comments | « no previous file | base/threading/thread.cc » ('j') | base/threading/thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698