[core] Keep shared_ptr to thread pool in CustomGeometrySource
CustomGeometrySource should keep strong reference to shared thread pool that is used by CustomTileLoader.
This commit is contained in:
@@ -14,7 +14,8 @@ namespace style {
|
||||
CustomGeometrySource::CustomGeometrySource(std::string id,
|
||||
const CustomGeometrySource::Options options)
|
||||
: Source(makeMutable<CustomGeometrySource::Impl>(std::move(id), options)),
|
||||
loader(std::make_unique<Actor<CustomTileLoader>>(*sharedThreadPool(), options.fetchTileFunction, options.cancelTileFunction)) {
|
||||
threadPool(sharedThreadPool()),
|
||||
loader(std::make_unique<Actor<CustomTileLoader>>(*threadPool, options.fetchTileFunction, options.cancelTileFunction)) {
|
||||
}
|
||||
|
||||
CustomGeometrySource::~CustomGeometrySource() = default;
|
||||
|
||||
Reference in New Issue
Block a user