[build] rework platform/default directory and add -files.txt for vendored libs
This commit is contained in:
14
platform/default/src/mbgl/util/shared_thread_pool.cpp
Normal file
14
platform/default/src/mbgl/util/shared_thread_pool.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <mbgl/util/shared_thread_pool.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
std::shared_ptr<ThreadPool> sharedThreadPool() {
|
||||
static std::weak_ptr<ThreadPool> weak;
|
||||
auto pool = weak.lock();
|
||||
if (!pool) {
|
||||
weak = pool = std::make_shared<ThreadPool>(4);
|
||||
}
|
||||
return pool;
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
Reference in New Issue
Block a user