From: Yedidya Feldblum Date: Thu, 10 Dec 2015 20:15:41 +0000 (-0800) Subject: Use SharedMutex as the default mutex type in Synchronized X-Git-Tag: deprecate-dynamic-initializer~191 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d8ebd43db7f2146a6a867ce4ec282d934ff32e36;p=folly.git 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 --- 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