Cancel all pending requests before leaving
This still has the unwanted side effect off blocking the Map thread waiting for the workers to return (because they hold a reference to the Map thread main loop). Maybe the only way to solve this would be having a I/O thread for dispatching messages. The Request is not bound anymore to the invoker thread because the workers will request for glyphs, but the reply will arrive at the Map thread.
This commit is contained in:
@@ -37,10 +37,9 @@ void ResourceLoader::setStyle(Style* style) {
|
||||
|
||||
style_ = style;
|
||||
|
||||
Environment& env = Environment::Get();
|
||||
for (const auto& source : style->sources) {
|
||||
source->setObserver(this);
|
||||
source->load(accessToken_, env);
|
||||
source->load(accessToken_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user