Summary:
[Folly] Use `SharedMutex` as the default mutex type in `Synchronized`.
`folly::SharedMutex` is, overall, a faster mutex than `boost::shared_mutex`. Let's upgrade.
Reviewed By: nbronson
Differential Revision:
D2743132
fb-gh-sync-id:
e36881495e8e1002cd481607e05e555c5da19b9a
#include <mutex>
#include <boost/thread.hpp>
#include <folly/Preprocessor.h>
+#include <folly/SharedMutex.h>
#include <folly/Traits.h>
namespace folly {
* refer to the namespace detail below, which implements the
* primitives for mutexes in std and boost.
*/
-template <class T, class Mutex = boost::shared_mutex>
+template <class T, class Mutex = SharedMutex>
struct Synchronized {
/**
* Default constructor leaves both members call their own default