make sure all of our async handles are stopped before stopping the map thread

This commit is contained in:
Konstantin Käfer
2014-09-16 14:48:46 +02:00
parent d9fc7708a2
commit 6c526e5637
10 changed files with 92 additions and 56 deletions

View File

@@ -38,19 +38,26 @@ namespace mbgl {
TileParser::~TileParser() = default;
TileParser::TileParser(const std::string &data, VectorTileData &tile,
const std::shared_ptr<const Style> &style,
const std::shared_ptr<GlyphAtlas> &glyphAtlas,
const std::shared_ptr<GlyphStore> &glyphStore,
const std::shared_ptr<SpriteAtlas> &spriteAtlas,
const std::shared_ptr<Sprite> &sprite)
const std::shared_ptr<const Style> &style_,
const std::shared_ptr<GlyphAtlas> &glyphAtlas_,
const std::shared_ptr<GlyphStore> &glyphStore_,
const std::shared_ptr<SpriteAtlas> &spriteAtlas_,
const std::shared_ptr<Sprite> &sprite_)
: vector_data(pbf((const uint8_t *)data.data(), data.size())),
tile(tile),
style(style),
glyphAtlas(glyphAtlas),
glyphStore(glyphStore),
spriteAtlas(spriteAtlas),
sprite(sprite),
style(style_),
glyphAtlas(glyphAtlas_),
glyphStore(glyphStore_),
spriteAtlas(spriteAtlas_),
sprite(sprite_),
collision(std::make_unique<Collision>(tile.id.z, 4096, tile.source.tile_size, tile.depth)) {
assert(&tile != nullptr);
assert(style);
assert(glyphAtlas);
assert(glyphStore);
assert(spriteAtlas);
assert(sprite);
assert(collision);
}
void TileParser::parse() {