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

Unified Diff: include/utils/SkThreadPool.h

Issue 26470005: SkThreadPool: tweak two little things that have been annoying me (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: reup Created 7 years, 2 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 | src/utils/SkThreadPool.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkThreadPool.h
diff --git a/include/utils/SkThreadPool.h b/include/utils/SkThreadPool.h
index 98657034e58bec72e90080df5800ccfed6a32612..6cb8b528d316624bb388b22b09eea132178fc251 100644
--- a/include/utils/SkThreadPool.h
+++ b/include/utils/SkThreadPool.h
@@ -9,10 +9,10 @@
#define SkThreadPool_DEFINED
#include "SkCondVar.h"
+#include "SkRunnable.h"
#include "SkTDArray.h"
#include "SkTInternalLList.h"
-class SkRunnable;
class SkThread;
class SkThreadPool {
@@ -31,6 +31,11 @@ public:
*/
void add(SkRunnable*);
+ /**
+ * Block until all added SkRunnables have completed. Once called, calling add() is undefined.
+ */
+ void wait();
+
private:
struct LinkedRunnable {
// Unowned pointer.
« no previous file with comments | « no previous file | src/utils/SkThreadPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698