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. |