Ensure ThreadPool constructor does not return until fully initialized.
Thread pool was being deleted too early during runtime shutdown,
this was causing a GC running during runtime shutdown to
occasionally reference a deleted thread pool.
Fixed an error where the thread pool was being deleted before the
threads were done attaching by making the thread pool constructor
block until all of the threads are attached.
Change-Id: I5f0884a74d78c4541ee0e582112857077f3f594f
diff --git a/src/barrier.h b/src/barrier.h
index 342890b..86ce2fe 100644
--- a/src/barrier.h
+++ b/src/barrier.h
@@ -25,7 +25,7 @@
class Barrier {
public:
- Barrier();
+ Barrier(int count);
virtual ~Barrier();
// Pass through the barrier, decrements the count but does not block.