Join worker tasks before destroying TileData

Fixes #1309
This commit is contained in:
John Firebaugh
2015-05-02 13:31:56 -04:00
parent e476fcbf3b
commit 5c7867f435
11 changed files with 111 additions and 40 deletions

View File

@@ -24,7 +24,11 @@ LiveTileData::LiveTileData(const TileID& id_,
state = State::loaded;
}
LiveTileData::~LiveTileData() {}
LiveTileData::~LiveTileData() {
// Cancel in most derived class destructor so that worker tasks are joined before
// any member data goes away.
cancel();
}
void LiveTileData::parse() {
if (state != State::loaded) {