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

@@ -8,7 +8,7 @@
namespace mbgl {
BaseRequest::BaseRequest() : thread_id(uv_thread_self()) {
BaseRequest::BaseRequest(const std::string &path_) : thread_id(uv_thread_self()), path(path_) {
}
BaseRequest::~BaseRequest() {
@@ -32,6 +32,7 @@ void BaseRequest::notify() {
if (response) {
// Now that we have our private copy, notify all observers.
for (std::unique_ptr<Callback> &callback : list) {
assert(callback);
(*callback)(*response);
}
}