C++11 equivalent to boost shared_mutex

Haatschii picture Haatschii · Jan 13, 2013 · Viewed 21.9k times · Source

Is there a C++11 equivalent for the boost::shared_mutex. Or another solution to handle a multiple reader / single writer situation in C++11?

Answer

Howard Hinnant picture Howard Hinnant · Jan 13, 2013

I tried but failed to get shared_mutex into C++11. It has been proposed for a future standard. The proposal is here.

Edit: A revised version (N3659) was accepted for C++14.

Here is an implementation:

http://howardhinnant.github.io/shared_mutex

http://howardhinnant.github.io/shared_mutex.cpp