[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:
committed by
Juha Alanen
parent
2e93f1e982
commit
3947d5fa98
@@ -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};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user