From d8ebd43db7f2146a6a867ce4ec282d934ff32e36 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Thu, 10 Dec 2015 12:15:41 -0800 Subject: [PATCH] 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 --- folly/Synchronized.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/folly/Synchronized.h b/folly/Synchronized.h index 109cea7c..668f6740 100644 --- a/folly/Synchronized.h +++ b/folly/Synchronized.h @@ -28,6 +28,7 @@ #include #include #include +#include #include 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 +template struct Synchronized { /** * Default constructor leaves both members call their own default -- 2.34.1