1 #include "shared_thread_pool.hpp"
2 
3 namespace mbgl {
4 
sharedThreadPool()5 std::shared_ptr<ThreadPool> sharedThreadPool() {
6     static std::weak_ptr<ThreadPool> weak;
7     auto pool = weak.lock();
8     if (!pool) {
9         weak = pool = std::make_shared<ThreadPool>(4);
10     }
11     return pool;
12 }
13 
14 } // namespace mbgl
15