Skip to content
Snippets Groups Projects
Commit 516e2580 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fix move assignment/constructor for DeviceModule

parent 79f2bf10
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,7 @@ namespace ChimeraTK { ...@@ -76,6 +76,7 @@ namespace ChimeraTK {
/** Move assignment */ /** Move assignment */
DeviceModule& operator=(DeviceModule&& other) { DeviceModule& operator=(DeviceModule&& other) {
assert(!moduleThread.joinable()); assert(!moduleThread.joinable());
assert(other.isHoldingInitialValueMutex);
Module::operator=(std::move(other)); Module::operator=(std::move(other));
device = std::move(other.device); device = std::move(other.device);
deviceAliasOrURI = std::move(other.deviceAliasOrURI); deviceAliasOrURI = std::move(other.deviceAliasOrURI);
...@@ -85,6 +86,7 @@ namespace ChimeraTK { ...@@ -85,6 +86,7 @@ namespace ChimeraTK {
proxies = std::move(other.proxies); proxies = std::move(other.proxies);
deviceHasError = other.deviceHasError; deviceHasError = other.deviceHasError;
for(auto& proxy : proxies) proxy.second._myowner = this; for(auto& proxy : proxies) proxy.second._myowner = this;
initialValueMutex.lock();
owner->registerDeviceModule(this); owner->registerDeviceModule(this);
return *this; return *this;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment