fixes for last commit

This commit is contained in:
fourtf
2019-08-01 13:30:58 +02:00
parent aac27c2a0d
commit e7d9422431
5 changed files with 56 additions and 14 deletions
+16 -1
View File
@@ -40,6 +40,14 @@ public:
{
}
Iterator &operator=(const Iterator &other)
{
this->lock_ = std::shared_lock(other.mutex_.get());
this->mutex_ = other.mutex_;
return *this;
}
TVectorItem &operator*()
{
return it_.operator*();
@@ -69,7 +77,7 @@ public:
private:
VecIt it_;
std::shared_lock<std::shared_mutex> lock_;
std::shared_mutex &mutex_;
std::reference_wrapper<std::shared_mutex> mutex_;
};
ReadOnlySignalVector()
@@ -113,6 +121,13 @@ public:
return this->vector_;
}
const std::vector<TVectorItem> cloneVector() const
{
std::shared_lock lock(this->mutex_);
return this->vector_;
}
void invokeDelayedItemsChanged()
{
assertInGuiThread();