Boost Syncronization and Single writer Multiple readers
I came across a solution to the "Single writer Multiple readers Problem" implemented with Boost here.
I read the Boost manual about Synchronization and some old (2002) article on Dr. Dobb, but I can not figure how this really works.
typedef boost::shared_mutex ReadWriteMutex;
typedef boost::shared_lock<boost::shared_mutex> ReadLock;
typedef boost::unique_lock<boost::shared_mutex> WriteLock;
void setValue(int value)
m_value = value;
int getValue(void) const
mutable ReadWriteMutex rw_mutex;
I do know the classics solution to the "Single writer multiple readers" and I guess this is equivalent.
I will be thankful if you could make me get it...