[core] Retain thread pool in GeoJSONSource

Otherwise, the construction of the `Immutable<Source::Impl>` in background thread might never yeld.
This commit is contained in:
Mikhail Pozdnyakov
2019-11-29 14:54:52 +02:00
committed by Juha Alanen
parent 2e93f1e982
commit 3947d5fa98
2 changed files with 4 additions and 3 deletions

View File

@@ -14,7 +14,7 @@
namespace mbgl {
class AsyncRequest;
class Scheduler;
namespace style {
struct GeoJSONOptions {
@@ -81,6 +81,7 @@ public:
private:
optional<std::string> url;
std::unique_ptr<AsyncRequest> req;
std::shared_ptr<Scheduler> threadPool;
mapbox::base::WeakPtrFactory<Source> weakFactory {this};
};