diff options
author | Christian Glöckner <cgloeckner@freenet.de> | 2016-03-31 10:15:37 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-03-31 21:15:44 +0200 |
commit | b3ed57f43d0fc18de5ac2610eabc5a97d9eea4a8 (patch) | |
tree | e2d1bfb0ba3fcf6eb1e49fbc98f58da291de0ce2 /src/syncedsettings.h | |
parent | afa2b578d6debc42bd4429b6efce8868b8f8fa81 (diff) |
Added thread-safety to implicit cpy/mv assign op for synced group settings
Diffstat (limited to 'src/syncedsettings.h')
-rw-r--r-- | src/syncedsettings.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/syncedsettings.h b/src/syncedsettings.h index eb8e66e..e60eb78 100644 --- a/src/syncedsettings.h +++ b/src/syncedsettings.h @@ -76,6 +76,7 @@ public: : mutex{} , data{} { + std::lock_guard<std::mutex> lock{mutex}; std::lock_guard<std::mutex> lock{other.mutex}; data = other.data; } @@ -84,6 +85,7 @@ public: : mutex{} , data{} { + std::lock_guard<std::mutex> lock{mutex}; std::lock_guard<std::mutex> lock{other.mutex}; std::swap(data, other.data); } |