Multiple-readers, single-writer locks in Boost?

Yes, you can do exactly what you want as shown in the accepted answer here . A call to upgrade to exclusive access will block until all readers are done.

Boost::shared_lock doesn't help in this situation (multiple readers that can become writers), since only a single thread may own an upgradable lock. This is both implied by the quote from the documentation in the question, and by looking at the code (thread\win32\shared_mutex. Hpp).

If a thread tries to acquire an upgradable lock while another thread holds one, it will wait for the other thread.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions