diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-11-29 14:54:52 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2019-11-29 15:37:49 +0200 |
commit | 3947d5fa98263d3b2b4b319b4f6629daca8c91ff (patch) | |
tree | 6df47ea1d010a6ef73d72c67c9098376a9f1a979 /include | |
parent | 2e93f1e9823f0994224d6fd6836987a0e5b2d7ff (diff) | |
download | qtlocation-mapboxgl-3947d5fa98263d3b2b4b319b4f6629daca8c91ff.tar.gz |
[core] Retain thread pool in GeoJSONSource
Otherwise, the construction of the `Immutable<Source::Impl>` in background thread might never yeld.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/sources/geojson_source.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mbgl/style/sources/geojson_source.hpp b/include/mbgl/style/sources/geojson_source.hpp index 9569b61df4..df2f9d2daf 100644 --- a/include/mbgl/style/sources/geojson_source.hpp +++ b/include/mbgl/style/sources/geojson_source.hpp @@ -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}; }; |