simplify - remove before/afterParse and create Parser on stack in worker thread

This commit is contained in:
artemp
2014-10-29 14:35:58 -04:00
parent 2607a755af
commit 6622a07ad8
4 changed files with 5 additions and 25 deletions

View File

@@ -79,11 +79,8 @@ void TileData::cancel() {
}
}
void TileData::beforeParse() {}
void TileData::reparse() {
beforeParse();
void TileData::reparse()
{
// We're creating a new work request. The work request deletes itself after it executed
// the after work handler
new uv::work<util::ptr<TileData>>(
@@ -92,10 +89,7 @@ void TileData::reparse() {
tile->parse();
},
[](util::ptr<TileData> &tile) {
tile->afterParse();
tile->map.update();
},
shared_from_this());
}
void TileData::afterParse() {}