c++ - boost::shared_mutex vs boost::mutex for multiple threads writing? -


i have scenario multiple threads writing common buffer (a map), each thread or not have same key. can please advise on whether should use boost::shared_mutex or boost::mutex? understanding boost::shared_mutex single writer , multiple reads not want. make boost::mutex more appropriate scenario?

thanks in advance

yes, boost::shared_mutex not case don't have pure readers , have multiple writers. use boost::mutex enforce exclusive access shared data.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -