Summary: Changed RWSpinLock to a SharedMutex in the RequestContext to see if this would lower the overhead of the onSet/onUnset callbacks.
Reviewed By: djwatson
Differential Revision:
D3780396
fbshipit-source-id:
3d91f8194357533072fe053d23e0454a36faecff
#include <map>
#include <memory>
-#include <folly/RWSpinLock.h>
+#include <folly/SharedMutex.h>
#include <folly/Synchronized.h>
namespace folly {
static std::shared_ptr<RequestContext>& getStaticContext();
using Data = std::map<std::string, std::unique_ptr<RequestData>>;
- folly::Synchronized<Data, folly::RWSpinLock> data_;
+ folly::Synchronized<Data, folly::SharedMutex> data_;
};
class RequestContextScopeGuard {