Commit d8ebd43d authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by facebook-github-bot-1

Use SharedMutex as the default mutex type in Synchronized

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
parent 17d04308
......@@ -28,6 +28,7 @@
#include <mutex>
#include <boost/thread.hpp>
#include <folly/Preprocessor.h>
#include <folly/SharedMutex.h>
#include <folly/Traits.h>
namespace folly {
......@@ -224,7 +225,7 @@ releaseReadWrite(T& mutex) {
* 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment