summaryrefslogtreecommitdiff
path: root/src/mbgl/util/thread_pool.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/util/thread_pool.hpp')
-rw-r--r--src/mbgl/util/thread_pool.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/util/thread_pool.hpp b/src/mbgl/util/thread_pool.hpp
index f302e50914..7642f9b4ca 100644
--- a/src/mbgl/util/thread_pool.hpp
+++ b/src/mbgl/util/thread_pool.hpp
@@ -52,8 +52,11 @@ public:
}
}
+ mapbox::base::WeakPtr<Scheduler> makeWeakPtr() override { return weakFactory.makeWeakPtr(); }
+
private:
std::array<std::thread, N> threads;
+ mapbox::base::WeakPtrFactory<Scheduler> weakFactory{this};
static_assert(N > 0, "Thread count must be more than zero.");
};