[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.
This commit is contained in:
Konstantin Käfer
2015-10-16 13:53:43 +02:00
parent 9bbd9aba3a
commit 4e3503ea6c
2 changed files with 29 additions and 30 deletions

View File

@@ -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;