[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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user