1#include "shared_thread_pool.hpp"
2
3namespace mbgl {
4
5std::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>(args: 4);
10 }
11 return pool;
12}
13
14} // namespace mbgl
15

source code of qtlocation/src/3rdparty/mapbox-gl-native/platform/default/mbgl/util/shared_thread_pool.cpp