From f62e5b00c98b50e9d9a1e76f4ae5e70129e83ff4 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Wed, 9 Oct 2019 16:23:12 +0300 Subject: [core] Introduce Scheduler::makeWeakPtr() --- src/mbgl/util/thread_pool.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 makeWeakPtr() override { return weakFactory.makeWeakPtr(); } + private: std::array threads; + mapbox::base::WeakPtrFactory weakFactory{this}; static_assert(N > 0, "Thread count must be more than zero."); }; -- cgit v1.2.1