diff --git a/src/rwcollection.h b/src/rwcollection.h --- a/src/rwcollection.h +++ b/src/rwcollection.h @@ -64,8 +64,8 @@ template class RWCollection { private: - T collection GUARDED_BY(rwlock); - mutable boost::shared_mutex rwlock; + T collection; + mutable boost::shared_mutex rwmutex; public: RWCollection() : collection() {} @@ -73,14 +73,14 @@ using ReadView = RWCollectionView>; ReadView getReadView() const { - return ReadView(boost::shared_lock(rwlock), + return ReadView(boost::shared_lock(rwmutex), collection); } using WriteView = RWCollectionView>; WriteView getWriteView() { - return WriteView(boost::unique_lock(rwlock), + return WriteView(boost::unique_lock(rwmutex), collection); } };