summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-11-29 14:54:52 +0200
committerJuha Alanen <juha.alanen@mapbox.com>2019-11-29 15:37:49 +0200
commit3947d5fa98263d3b2b4b319b4f6629daca8c91ff (patch)
tree6df47ea1d010a6ef73d72c67c9098376a9f1a979 /include
parent2e93f1e9823f0994224d6fd6836987a0e5b2d7ff (diff)
downloadqtlocation-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.hpp3
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};
};