diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-10-16 13:53:43 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-10-26 15:54:27 +0100 |
commit | 4e3503ea6cf30c55a2cc86f78c4a607bd14f1c41 (patch) | |
tree | 7dd2c138ffdf548227c3ce5c63ddfb4565b393b7 /include | |
parent | 9bbd9aba3a8cebf7191ae5b28c8cf16acf39987e (diff) | |
download | qtlocation-mapboxgl-4e3503ea6cf30c55a2cc86f78c4a607bd14f1c41.tar.gz |
[core] do not use std::atomic_* with shared_ptrs
It's not implemented in GCC 4.9.2's stdlib (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57250). Instead, we're now always using a mutex to protect access; we previously created a mutex only on cancelation, but since we're always canceling now, it makes sense to allocate it right away.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/storage/request.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/storage/request.hpp b/include/mbgl/storage/request.hpp index 4b75f23f6e..1fb15c5a92 100644 --- a/include/mbgl/storage/request.hpp +++ b/include/mbgl/storage/request.hpp @@ -33,13 +33,13 @@ public: private: ~Request(); - void invoke(); void notifyCallback(); private: - std::unique_ptr<uv::async> async; - struct Canceled; - std::unique_ptr<Canceled> canceled; + std::mutex mtx; + bool canceled = false; + bool confirmed = false; + const std::unique_ptr<uv::async> async; Callback callback; std::shared_ptr<const Response> response; |